Skip to content

Make tns run use livesync by default #1366

@tjvantoll

Description

@tjvantoll

I’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 #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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions