GitHub user mattdsteele opened a pull request:

    https://github.com/apache/cordova-lib/pull/358

    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 https://github.com/mattdsteele/cordova-lib master

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

    https://github.com/apache/cordova-lib/pull/358.patch

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 <[email protected]>
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to