grunt-phonegap icon indicating copy to clipboard operation
grunt-phonegap copied to clipboard

Support for command-line options when adding plugins

Open matthewgertner opened this issue 10 years ago • 3 comments

phonegap-facebook-plugin requires the use of the --variable command-line parameter when using phonegap add (a more detailed description of the process at https://github.com/Wizcorp/phonegap-facebook-plugin/issues/551). This is because the plugin needs values for the variables APP_NAME and APP_ID. As far as I can see, there is no way of specifying command-line options with grunt-phonegap.

There is a similar issue filed for grunt-cordovacli as well: https://github.com/csantanapr/grunt-cordovacli/issues/7

matthewgertner avatar Sep 02 '14 10:09 matthewgertner

+1

@matthewgertner, did you find a work around for this?

mattvot avatar Jul 27 '15 15:07 mattvot

Looks like this is the file that would need changing: https://github.com/logankoester/grunt-phonegap/blob/master/src/tasks/build/base/plugin.coffee

We can modify the command. Perhaps look to see if each of the plugins is a string (perform normal behaviour) or an object (new way to include the plugin name and variables as properties of the object).

Unfortunately it's highly unlikely I will have the time to issue a pull request.

mattvot avatar Jul 27 '15 15:07 mattvot

I think we ended up working around this by calling a shell script from our Gruntfile to do the Phonegap build.

matthewgertner avatar Jul 28 '15 08:07 matthewgertner