I am getting error when tried to use cordovacli with my project.
on gruntfile.js I am using load-grunt-config plugin to break down grunt script.I create file for cordovacli (cordovacli.js) , and added the script to create mobile package.
I getting the following error when it try to execute cordova command (grunt createCordova:cordovacli)
Error Cordova does not know undefined; try cordova help for a list of all the available commands.
Warning: Use --force to continue.
Error
at callDone (C:\test\node_modules\grunt\node_modules\grunt-legacy-util\index.js:159:56)
at ChildProcess. (C:\test\node_modules\grunt\node_modules\grunt-legacy-util\index.js:198:5)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
Aborted due to warnings.`
This is my code on gruntfile.js
module.exports = function(grunt) { require('load-grunt-config')(grunt); grunt.registerTask('createCordova', ['cordovacli']); };
and this is from cordovacli.js
module.exports = { cordovacli: { options: { path: 'mobile/testApp', cli: 'cordova' }, build_ios: { options: { command: 'build', platforms: ['ios'] } } } };
Note: If I use grunt.initConfig and place the script inside gruntfile.js, cordovacli plugin will work fine. the reason I am using load-grunt-config because I have big script and many plugins and it help to organize mt script.
I am getting error when tried to use cordovacli with my project. on gruntfile.js I am using load-grunt-config plugin to break down grunt script.I create file for cordovacli (cordovacli.js) , and added the script to create mobile package. I getting the following error when it try to execute cordova command (grunt createCordova:cordovacli)
This is my code on gruntfile.js
module.exports = function(grunt) { require('load-grunt-config')(grunt); grunt.registerTask('createCordova', ['cordovacli']); };
and this is from cordovacli.js
module.exports = { cordovacli: { options: { path: 'mobile/testApp', cli: 'cordova' }, build_ios: { options: { command: 'build', platforms: ['ios'] } } } };
Note: If I use grunt.initConfig and place the script inside gruntfile.js, cordovacli plugin will work fine. the reason I am using load-grunt-config because I have big script and many plugins and it help to organize mt script.