Baseline installations of the tools needed to develop a combo Cordova/AngularJS/Ionic Framework mobile application. This solution works best in concert with the vagrant-angular-env project.
The bonus feature of this baseline is the ability to build out two sets of end-to-end tests: one with a mock backend and one with a live backend. When run in the appropriate mode, Grunt will configure the index.html and protractor config files to point to the right files. A side effect of this is that changes to these files should be made to the ".template.*" versions and not to the html or js file versions.
This solution includes the following tools:
This assumes that Cordova is installed on the local machine.
Install your node packages and bower libraries:
npm install
bower install
grunt test:unit
grunt karma:watch watch
This will run the e2e tests against Chromium and FireFox (and eventually, PhantomJS. PhantomJS gives issues after the first run through and is commented out, for now).
This task assumes an external Selenium server. The configuration can be changed in the test/e2e/protractor.conf.base.template.js file.
grunt test:e2e_mock
grunt test:e2e_live
grunt serve
grunt build
cordova build <ios/android>
cordova emulate <ios/android>
if you see any errors when running the grunt tasks, run the following command while in the source folder:
npm ls
This may tell you that there are unmet dependencies. Manually install those dependencies:
npm install [email protected]
npm install graceful-fs@~2.0.0