Install webpack
npm install -g webpack
Install a server, if you don't have one or aren't going to use webpack-dev-server
npm install -g http-server
Install application dependencies
npm install
Run a debug build and starts a server at localhost:8080 using http-server
npm start
Run a debug build (file watcher, source maps, non-minified)
webpack -d --watch --progress
Run a release build (minified)
webpack -p --progress
The build outputs files in the www
folder, which Cordova uses to create the native installers. Run a server here to access the site locally.
Install Cordova
npm install -g cordova
Add necessary platforms and plugins
cordova platforms add ios
cordova platforms add android
cordova plugin add org.apache.cordova.console
cordova plugin add org.apache.cordova.device
cordova plugin add org.apache.cordova.splashscreen
cordova plugin add org.apache.cordova.statusbar
cordova plugin add org.apache.cordova.whitelist
Build an installer
cordova build ios
cordova build android
Run an emulator
cordova emulate ios
cordova emulate android
Install firebase tools
npm install -g firebase-tools
Optimize the codebase
webpack -p
Upload to firebase
firebase deploy
(to emmersive-dev)
Upload to different environment in firebase
firebase deploy -f emmersive-stage
(staging)
firebase deploy -f flickering-inferno-1351
(production)
android list targets | grep 22
-> get ID for next lineandroid create avd -n cordova -t 22 -b google_apis/x86_64
In chrome, you can load the dev tools and point it at the app just like you would normally debug a web page. This will give you access to the javascript console, network, dom inspector, etc.