- Lazy module loading: split app into modules and load on demand instead of up front (see app/pages/main/main.module.ts)
- SASS: transpile into CSS (ctrl + shift + B in VSCode)
- TSLint: Common formatting rules
- VSCode settings: JS Beautify run on save, TSLint immediately, hide JS files when TS version exists, hide extra files
- Useful .gitignore (may want to uncomment .vscode after cloning)
- release script for android
- Install Visual Studio Code, git, and node
- Open VS Code and click the extensions button (bottom icon on the sidebar)
- Install Beautify, Project Snippets, and TSLint extensions for VSCode
- press ctrl + ` (backtick) to open command line
git clone https://github.com/tylergrinn/nativescript-boilerplate.git [PROJECT_NAME] & cd [PROJECT_NAME]
git remote rename origin boilerplate
- Edit first seven lines of package.json. Make the 'id' of the app in the form of com.organization_name.app_name
- Edit "app_name" and "title_activity_kimera" in app/App_Resources/Android/values/strings.xml and app/App_Resources/Android/values-v21/strings.xml
- Edit mainfest -> application -> android:name on line 22 of app/App_Resources/Android/AndroidManifest.xml
npm install -g nativescript
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
tns doctor
tns run ios/android
- If you need a new key:
npm run key
npm run release
- Release apk will be in platforms/android/build/outputs/apk
- Commit and tag with the version number before uploading to the play store
- Increase "version code" by 1 and edit the "version name" in app/App_Resources/Android/AndroidManifest.xml (lines 4 & 5) for next release
- Clean the project:
npm run clean
If you receive "Error: Duplicate resources", delete node_modules/semver/semver.browser.js.gz & node_modules/semver/semver.min.js.gz and clean: npm run clean
git pull boilerplate HEAD
WARNING: may cause conflicts, especially in app/pages/main folder