This is a modern JS skeleton for Brunch, targeting hybrid applications with Cordova.
Clone this repo manually or use brunch new dir -s brunch/with-cordova
- Install (if you don't have them):
- Run:
npm start
— watches the project with continuous rebuild. This will also launch HTTP server with pushState.npm run build
— builds minified project for productionruby mobile.rb run/emulate/build ios
- Learn:
cordova/www/
dir is fully auto-generated. Write your code inapp/
dir.- Place static files you want to be copied from
app/assets/
tocordova/www/
. - Brunch site, Getting started guide
The Cordova directory is kept out of source control, as it's a good practice. The core piece of Cordova setup, a config, is kept in the repo.
Feel free to modify config.xml
to suit your needs. You can also declare the plugins you need right in the config.
The skeleton provides a helper script to bootstrap the cordova app:
ruby mobile.rb init
And run it:
ruby mobile.rb run ios # (or `emulate`/`build` instead of run)