This is a sample project wrapping the tns commands in a Grunt script that compiles the TypeScript code and assembles the correct app folder structure.
- We keep everything below
./src. DO NOT PUT ANYTHING IMPORTANT IN./app - The TypeScript compiler puts transpiled
.jsfiles in `./app' - A Grunt task updates all app assets and the
tns_modulesfolder too.
$ npm install
$ tns platform add android
$ tns platform add ios
$ grunt app-full.When done, run the emulator (see below).
- Edit some files.
- Start the emulator using:
grunt run-android --avd <YOUR AVD>orgrunt run-ios --device <YOUR DEVICE>- Hit Ctrl-C when done.
- Update your platforms.
- Update your
src/tns_modulesfolder with the latest version of the module code. - Remove the 1.5.2
*.d.tsfiles belowsrc/typings/nativescript/1.5.2and add the new type declarations in a similarly named folder. - Update
*.d.tspath references to the new typings folder insrc/dependencies.d.ts