Cordova
command-line tool is distributed as an npm package in a ready-to-use format.
It
is not necessary to compile it from source.
Follow
these steps:
Following
installation, you should be able to invoke node and npm on
your command line. If desired, you may optionally use a tool such as nvm or nave to
manage your Node.js installation.
- Download and
install a git
client, if you don't already have one. Following installation,
you should be able to invoke git on your command line. Even
though you won't be using git manually, the CLI does use it
behind-the-scenes to download some assets when creating a new project.
- Install the cordova module
using npm utility of Node.js. The cordova module will
automatically be downloaded by the npm utility.
·
On OS X and Linux - > $
sudo npm install -g cordova
On
OS X and Linux, prefixing the npm command with sudo may be
necessary to install this development utility in otherwise restricted
directories such as /usr/local/share.
If you are using the optional nvm/nave tool or
have write access to the install directory, you may be able to omit the sudo prefix.
·
on Windows: - > C:\>npm install -g
cordova
- The -g flag
above tells npm to install cordova globally. Otherwise
it will be installed in the node_modules subdirectory of the
current working directory.
- You may need to add the npm directory to your PATH in order to invoke globally installed npm modules.
- On Windows, npm can usually be found at C:\Users\username\AppData\Roaming\npm.
- On OS X and Linux it can usually be found at /usr/local/share/npm.
- The installation log may produce errors for any uninstalled platform SDKs.
- Following
installation, you should be able to run cordova on the command
line with no arguments and it should print help text.
Can I use Cordova in phonegap ???
ReplyDeleteplz tell me more about cordova ??
ReplyDelete