Make `tns run` use livesync by default
See original GitHub issueI’ve spent some time over the holidays playing with a variety of frameworks, and one thing I’ve noticed is that livesync functionality is increasingly the default behavior that developers expect. React Native watches by default, and Angular 2’s setup does as well.
My suggestion is to have tns run also setup/run tns livesync by default (and perhaps provide a --no-livesync flag to turn it off or something like that). IMO this would significantly help the getting started experience. One complication is that we probably want https://github.com/NativeScript/nativescript-cli/issues/763 implemented first, so that tns run continues to show console logs and stack traces.
UPDATE (May 20th, 2016): #763 was implemented and shipped in 2.0.
One alternative is that we could include a handful of npm scripts in the default project’s package.json. Something like npm run ios|android that runs the app and sets up a watcher by default. For example in Angular 2 npm start, starts a browser tab and an HTTP server, watches for changes to code, and deploys those changes automatically.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:5
- Comments:10 (6 by maintainers)

Top Related StackOverflow Question
I support this only given that livesync works as expected. Otherwise we’d need a separate option in the
tns runcommand, purely for the sake of disabling the implicit livesync behavior. I guess writingtns run --nolivesyncdoesn’t seem appealing to anyone here 😃We should also consider this from the VSCode extension perspective. @ivanbuhov @blagoev What do you think guys?
…IMO --watch by default as well, whats the use case for livesync with no watch specified?