cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattdsteele <>
Subject [GitHub] cordova-lib pull request: Add cli_variables to plugman before_plug...
Date Wed, 23 Dec 2015 21:51:38 GMT
GitHub user mattdsteele opened a pull request:

    Add cli_variables to plugman before_plugin_install hook params

    Currently the context provided to the `before_plugin_install` hook does not include plugin
variables/parameters. This is problematic for my use case, where I bundle a hook with the
plugin that performs string manipulation based on plugin variables a user defines.
    It's possible to get default values (if they are defined) in a hook using the `context.opts.plugin.pluginInfo.getPreferences()`,
but this does not account for `cli_options`, or those defined in an plugin through `config.xml`
in the `<variable>` element.
    This change adds a `variables` key to the hook's context, which contains the CLI (or default)
plugin variables. A hook could access them through the `context.opts.plugin.variables` object.

You can merge this pull request into a Git repository by running:

    $ git pull master

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #358
commit 9502258ee0a18b3d25b831a46f128d3930813109
Author: Matt Steele <>
Date:   2015-12-23T21:36:44Z

    Add cli_variables to plugman before_plugin_install hook params


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message