NativeScript / NativeScript/nativescript-cli
Add `console` command to open live REPL on running NativeScript application
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 1.1k
- Forks
- 204
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 8
Beschreibung
Is your feature request related to a problem? Please describe.
A REPL is a developer's best friend. Sometimes you just want to play with the native JavaScript integration, or do a quick debug session without all the rigamarole of starting up a devtools session. There's nothing quite like it in terms of exploration.
Describe the solution you'd like
Add a console command that fires up a remote node REPL session to Read expressions from the local machine, Evaluate them on the device, and Print them on the local machine.
Build the app, load it onto a device, and startup a new REPL:
$ tns console ios
{N}> UIButton
[Function: UIButton]
{N}>
or attach to an existing process:
$ tns console android --device UUID
{N}> android.widget.Button
[Function: Button]
{N}> android.widget.Button
Describe alternatives you've considered
You can use the chrome devtools coupled with the the tns debug command. It just doesn't feel as breezy.
Additional context
Node comes with repl tools out of the box that give you pretty fine grained control over where evaluation happens, how completion and history are achieved, etc....
The only thing would be to implement the remote connection to the nativescript app.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit den REPL-Tools von Node und dem bestehenden Befehl tns debug, der im Issue beschrieben ist. Definiere die Einstiegspunkte tns console ios und tns console android --device UUID, einschließlich sowohl des Startens als auch des Verbindens mit einer Anwendung. Als abgeschlossen gilt die Aufgabe, wenn lokal eingegebene Ausdrücke auf dem Gerät ausgewertet und ihre Ergebnisse im lokalen REPL ausgegeben werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, node.js
- Bereich
- cli, mobile-dev
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100