Monday, September 29, 2014

Cordova + AngularJS = App

On Windows, with Java already installed.  There is no right way, but there are a million wrong ways.

  1. Install node.js, ant, android sdk and setup paths/dependencies.  Setup Android VM and run SDK manager to download additional SDK dependencies
  2. Install cordova w/ npm
    1. npm install -g cordova
  3. Create empty cordova app in projects folder
    1. cd projects
    2. cordova create my-app MyApp
    3. cordova platform add android
    4. Install some plugins
  4. Run the empty app
    1. cordova emulate android
    2. Wait many minutes for VM to boot
    3. Cordova's hello world app displays
    4. Leave emulator open for faster build/deploys later
  5. Ditch that app and start from scratch knowing that you can always go back quickly
  6. Download yeoman and setup more complex project structure
    1. npm install -g yo
    2. npm install -g generator-angularjs-cordova
    3. yo angularjs-cordova
    4. grunt build
    5. cordova emulate
  7. Start hacking