Useful Tools for PhoneGap Apps

A Basic Toolset

To achieve an efficient workflow for constructing PhoneGap apps, we use these basic tools.

Bower

Use Bower to manage your JavaScript dependencies. Place a bower.json file in your www folder.

The simplest file is:

{
   "name": "HybridApp",
   "description": "Hybrid mobile App",
   "version": "1.0.0",
   "homepage": "http://yoramkornatzky.com",
   "license": "MIT",
   "private": true,
   "dependencies": {
       "underscore": "latest",
       "fontawesome": "latest",
       "underscore.string": "latest",
       "underscore.number": "latest"
   }
}

where underscore, and the others are just an example.

You then download and install your dependencies with:

cd www
bower install

This will generate a bower_components folder in the www folder. Include the required files in your html files.

Sass

Using plain css is not modular and not reusable. Use Sass in the scss format. Place a style.scss file in your www folder, and continuously generate the css file on every change with:

cd www
sass --watch www/style.scss:www/style.css