1. Creating a
Cordova Project
Hay Friends today we are going to create a
cordova project using CLI
1.
First
you have to install node.js(http://nodejs.org/) into your system.Then open your
command prompt and type below commands to install cordova.
§
If
you’re using windows npm install -g cordva
§
If
you’re using mac sudo npm install -g cordova
2.
Then
change your directory to the place where you wish to create the project and
create your project (FirstApp) using below command.
cordova create FirstApp com.lightmeal.firstapp FirstApp
3.
Now
you have to change your directory to the FirstApp project folder. If not it
will give an error message “Currently working directory is not a Cordova base
project”?
Time to install
the platforms you need to support for your application. In my case I will do it
for android. But you can do it for even wp8, windows8, iOS….
cordova platforms add android
4.
To
make sure the selected platforms are installed correctly just type (It will
show all the installed platforms and all available platforms for the project).
cordova platform ls
5.
In
future you may need to find out your Cordova version .So to do that just type.
cordova –v
That’s all for today .In next post we will
discuss how to build Cordova android project and emulate/run it :)
No comments:
Post a Comment