Add `console` command to open live REPL on running NativeScript application
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript, node.js
- Bereich
- cli, mobile-dev
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.
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.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 1.1k
- Forks
- 204
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 8
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus NativeScript/nativescript-cli
-
in-progress
NativeScript/nativescript-cli#6140 · 2 Kommentare · 1 zugewiesene Person ·
-
NativeScript/nativescript-cli#6090 · 1 zugewiesene Person ·
-
in progress
NativeScript/nativescript-cli#6015 · 1 Reaktion · 1 zugewiesene Person ·
-
question
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
NativeScript/nativescript-cli#5992 · 5 Kommentare ·
-
feature-pending-triage
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
NativeScript/nativescript-cli#5975 ·