BTC Cordova

Core

Angular

Chaplin

Ember

Download

Table of Contents

  1. About
  2. Tasks
    1. Extras
    2. Cordova
    3. Assembling

About

This is a starter project template to build rich hybrid native/web applications with Apache Cordova using Node.js. This skeleton is aimed at leveraging packages to develop and build, while providing a set of unified tasks and definitions to focus less on configuration and setup.

Core

This starter project builds on top of core packages and utilities. Visit this page for more information on core functionality.

Tasks

Additional tasks are included for working with Cordova. Visit this page for more information on tasks.

Extras

These commands add additional features/items to the project that are not included by default. If you're working with a web framework some of these may not be available.

add:fastclick
rem:fastclick

Add/remove FastClick to/from the project for optimized click events in touch devices.

add:hammer
add:hammerjquery
rem:hammer

Add/remove Hammer.js (standalone or jQuery plugin) to/from the project for touch event handling.

add:devicejs
rem:devicejs

Add/remove device.js to handle different device options in CSS and JavaScript. NOTE: by default the project is configured so if device.js is used, it is accessed using the devicejs variable. This is to avoid conflict with Cordova's device variable.

Cordova

These set of tasks are to set up and initialize Cordova projects to wrap your application as a native application. device denotes the application device to target. (currently supports ios and android) The Cordova project is created in the cordova directory. The workflow copies assets to cordova/www.

cordova:init package=io.cordova.hellocordova name=HelloCordova

Generate a new Cordova project using cordova-cli.

cordova:ls

List device platforms and plugins the Cordova project currently supports.

cordova:add device=[device]
cordova:rem device=[device]

Add/remove specified device support to/from the Cordova project.

cordova:add plugin=[plugin]
cordova:rem plugin=[plugin]

Add/remove a plugin to/from the Cordova project.

cordova:update device=[device]

Update specified device platform. This is useful when you update Cordova and as a result requires updating specific platform features.

Assembling

Additional tasks/parameters are included to support packaging Cordova projects into native applications.

build:[mode] device=[device]

If you include the device parameter then instead of just assembling code and assets, they are trasfered over to the Cordova project and a native application package is built. (ex: jake build:prod device=ios)

emulate:[mode] device=[device]

Assemble code and assets, build a native application with Cordova, and deploy to an emulator for the specified device. NOTE: ios-sim is required to start the iOS simulator on OS X.