Closed florentvaldelievre closed 10 years ago
@florentvaldelievre you can create as many tasks as you want for adding plugins you don't have to use only one.
add_plugins: {
options: {
command: 'plugin',
action: 'add',
plugins: [
'device','camera'
]
}
},
add_plugins_vars: {
options: {
command: 'plugin',
action: 'add',
plugins: [
'https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git',
],
args: '--variable URL_SCHEME=tel'
}
},
grunt.registerTask('add_all_plugins', ['cordovacli:add_plugins','cordovacli:add_plugins_vars']);
Are you sure the "args" option is working properly?
I am getting "Variable is missing" and plugin is not added even though the command line looks good:
Running "cordovacli:add_intent" (cordovacli) task
Using cordova CLI version (4.1.2)
Setting Current Working Directory (CWD) to cordova
Running:node C:\Users\Alexander Schmidt\Projects\rsion\node_modules\cordova\bin\cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin .git --variable URL_SCHEME=rsmobile
Fetching plugin "https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git" via git clone
Variable(s) missing (use: --variable URL_SCHEME=value).
Done-> cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=rsmobile
Success-> with Series tasks
Done, without errors.
My grunt task looks exactly the same as the one above. Any idea?
same here as @AlexanderSchmidt :(
This worked for me:
options: {
command: 'plugin',
action: 'add',
args: ["--variable", " URL_SCHEME=abc123"],
plugins: ["https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git"]
}
"args" as Array works! Thanks for the hint! This will make my live much easier in future :+1:
Hello,
With cordovacli, it is possible to add plugins with variable like:
cordova plugins add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=hibe
It would be nice to be able to do the following:
At the moment it is failing with the following error:
Running:node C:\dev\apps\turkey\hibe-webapp\web-app\node_modules\cordova\bin\cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.gi t --variable URL_SCHEME=hibe Fetching plugin "https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=hibe" via git clone Error: Command failed: Cloning into 'C:\Users\valdelif\AppData\Local\Temp\plugman\git\1409081179796'... fatal: unable to access 'https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=tel/': The requested URL returned error: 400
As a workaround I am using the 'args' options like this:
However, it will add all the plugins with the args which is not the expected behavior. Let me know the feasability
Many thanks