Cordova new
The cordova
command!
cordova new
is a command used to create a new Cordova project. When you run cordova new
, you'll be prompted to choose a project template and configure some basic settings.
Here's a breakdown of the options:
- Project template: You can choose from a variety of project templates, such as:
blank
: A basic Cordova project with no plugins or platforms.browser
: A Cordova project that runs in a browser.ios
: A Cordova project that targets iOS devices.android
: A Cordova project that targets Android devices.wp8
: A Cordova project that targets Windows Phone 8 devices.wp8.1
: A Cordova project that targets Windows Phone 8.1 devices.
- Project name: You'll be asked to enter a name for your project.
- Project directory: You can choose the directory where your project will be created.
- Package name: For Android and iOS projects, you'll be asked to enter a package name (e.g., com.example.myapp).
Here's an example of how you might use the cordova new
command:
cordova new myapp
This will create a new Cordova project called myapp
with a basic template and no plugins or platforms.
If you want to create a project with a specific template, you can specify the template name as an option:
cordova new myapp --template browser
This will create a new Cordova project called myapp
with a browser template.
Note that you'll need to have Node.js and the Cordova CLI installed on your system to use the cordova new
command.