Create a new Cordova Application. Extra config: folder, bundleId, platforms and plugins.
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-phonegap-project --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-phonegap-project');
To add support or rebuild a project for any platform, you need from the same machine that supports the platform's SDK.
npm install cordova -g
All options are optional.
Type: String
, Default: build
Path to install the new app.
Type: String
, Default: MyyApp
Type: String
, Default: de.myylinks.myyapp
Unique identifier Package name for all Android Apps.
Type: Array
, Default: []
Type: Array
, Default: []
Type: Boolean
, Default: false
Info: For create a new app need an empty folder.
WARNING: If true
they are delete folder of options.path
.
In your project's Gruntfile, add a section named phonegap_project
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
phonegap_project: {
app_1: {
options: {
deleteOptionsPath: true,
path: "buildfolder",
platforms: [
"browser",
"android"
],
plugins: [
"cordova-plugin-battery-status",
"cordova-plugin-camera"
]
}
}
}
});
grunt.registerTask('phonegap: create new app', ['phonegap_project:app_1']);
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
- update grunt to 1.0.1
- add multitasking
- clean project
- update
- update grunt to 0.4.5
- add lodash
- add new variable deleteOptionsPath
- bugfixes
- bugfix some grunt functions
- add travis
- clean project for public
- add some defaults cordova commands
Copyright (c) 2014 SvenLang
Licensed under the MIT license.