Installing PhoneGap with NPM
We will use NPM (Node Package Manager) for all the future steps. NPM is part of Node.js, so we should already have installed it. Once you've installed Node.js, you can make sure you've got the most recent version of NPM using npm
itself:
$ sudo npm install npm -g
(On Windows, you can drop sudo
, but you should run it as administrator). Running this update will give you the most recent stable version of npm
, also supported by NPM Inc.
So, we got Node.js and NPM installed. Let's install PhoneGap now. Open your command line and run the following command:
$ sudo npm install -g phonegap
Once the installation completes, you can invoke phonegap
on the command line for further help. However, before that, let's understand how PhoneGap is organized.