Book Image

CoffeeScript Application Development Cookbook

By : Mike Hatfield
Book Image

CoffeeScript Application Development Cookbook

By: Mike Hatfield

Overview of this book

Table of Contents (18 chapters)
CoffeeScript Application Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a basic Cordova application


In this recipe, we will run through the steps to create a basic Cordova application.

Getting ready

Before getting started with Cordova, we must install the Cordova library. Cordova can be installed as a Node package.

Open a terminal window and install the Node package with the following code:

npm install -g cordova

This will install the Cordova package into Node's global space and allows us to use the Cordova command-line utilities to create and manage our mobile application.

How to do it...

Once Cordova has been installed, we can use the cordova command-line tool to create a mobile application.

At a terminal window, perform the following steps:

  1. Execute the cordova create command:

    cordova create HelloWorld com.csbook.helloworld
  2. Switch to the HelloWorld directory:

    cd HelloWorld
    
  3. Add a target platform using the cordova platform add command:

    cordova platform add android

How it works...

Issuing the cordova create command will create a simple folder structure and Cordova...