Tns run with manual deploy?


#1

Hi guys,

Recently I started developing a commecial app for my company and I managed to get the example app running on an android-device. I did this with the command “tns run android” and after 1 oder 2 minutes of no output at all (Very misleading -> thought the app was crashed and frozen) there goes a lot of info on the screen. After another couple of minutes the app is finally starting on the device. Now at first I throught “Wow, i hope i won’t have to run that command every time i make a change in the code” but after my first changes to the code i was very happy to see that the changes are deployed on the fly.

However this “Auto-deploy” came in very unfortunate when I saved a file that was not ready yet (I do that a lot midsentence and it is a fixed habbit of mine). The result was that the Native-Script Preview App on my android phone instantly crashed with an exception and on the pc the command prompt said “Unable to apply changes on device” and “Stopping tsc watch”. I had to stop the command and restart it with “tns run android”.

Now my question: Is there a way to stop “Auto-Deploy” and do a “Manual-Deploy” instead?
Because otherwise I don’t know how to develope at an acceptable speed.


#2

No, it’s not possible to control the deploy. It simply listens for file changes and pushes it, you shall not save it before it’s a valid change.

Other option is that you can write your own hook to control this behavior if you like to.