csantanapr / grunt-cordovacli

Wraps web app with Cordova CLI using GruntJS
Apache License 2.0
60 stars 31 forks source link

options.path is being ignored #12

Closed hchoong closed 9 years ago

hchoong commented 10 years ago

I am trying to run grunt cordovacli:add_plugins by it keep installing the plugins on the root directory and not the path cordova that I specified.

module.exports = function (grunt) {
    return {
        options: {
            path: 'cordova'
        },
        add_platforms: {
            options: {
                command: 'platform',
                action: 'add',
                platforms: ['ios', 'android']
            }
        },
        add_plugins: {
            options: {
                command: 'plugin',
                action: 'add',
                plugins: [
                    'org.apache.cordova.console'
                ]
            }
        }
    }
};
csantanapr commented 9 years ago

Was not able to reproduce your problem Here is the Gruntfile.js I used, double check your Gruntfile and make sure that tasks are inside cordovacli task

module.exports = function (grunt) {
'use strict';

// Project configuration.
grunt.initConfig({
    cordovacli: {
        options: {
            path: 'cordova'
        },
        add_platforms: {
            options: {
                command: 'platform',
                action: 'add',
                platforms: ['ios', 'android']
            }
        },
        add_plugins: {
            options: {
                command: 'plugin',
                action: 'add',
                plugins: [
                'org.apache.cordova.console'
                ]
            }
        }
    }

});
// Actually load this plugin's task(s).
grunt.loadTasks('tasks');
};

(master)$ cordova create cordova Creating a new cordova project with name "HelloCordova" and id "io.cordova.hellocordova" at location

(master)$ grunt cordovacli:add_plugins Running "cordovacli:add_plugins" (cordovacli) task Using cordova CLI version (4.2.0) Setting Current Working Directory (CWD) to cordova Running:/Users/csantana23/dev/cordova/grunt-cordovacli/node_modules/cordova/bin/cordova plugin add org.apache.cordova.console Fetching plugin "org.apache.cordova.console" via plugin registry Done-> cordova plugin add org.apache.cordova.console Success-> with Series tasks

Done, without errors.

(master)$ ls cordova/plugins/ org.apache.cordova.console