To install cordova-cli on your development machine and create a project enabling only the desired mobile platforms, follow these steps.
Note
Node.js and npm are required in order to run cordova-cli. You can download and install the distribution for your platform from the official website available at http://nodejs.org/download/and the package manager (i.e., npm) available at https://npmjs.org/. Since Node.js Version 0.6.3 npm is bundled with the installer.
Install cordova-cli using the command-line tool:
$ npm install -g cordova
Change the permissions on the
cordova
folder innode_modules
in order to to run commands as root:$ sudo chown -R <username> /usr/local/lib/node_modules/cordova
Create a new project specifying the path and optionally a name and an ID using the
cordova
utility:$ cordova create...