cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-6655) Export plugin ID to hooks when adding plugins from Git repos
Date Sat, 10 May 2014 22:10:28 GMT

    [ https://issues.apache.org/jira/browse/CB-6655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13992801#comment-13992801
] 

ASF subversion and git services commented on CB-6655:
-----------------------------------------------------

Commit efecd10ed64ba891251169eed7f770401870305c in cordova-lib's branch refs/heads/master
from [~mikecunneen]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=efecd10 ]

CB-6655 Export plugin ID to hooks when adding plugins from Git repos

github: close #1


> Export plugin ID to hooks when adding plugins from Git repos
> ------------------------------------------------------------
>
>                 Key: CB-6655
>                 URL: https://issues.apache.org/jira/browse/CB-6655
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Plugman
>    Affects Versions: 3.4.0
>         Environment: all environments
>            Reporter: Mike Cunneen
>            Priority: Trivial
>              Labels: easyfix, features
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> An {{after_plugin_add}} hook script has access to the following environment variables
(with example values):
> {quote}
>   CORDOVA_VERSION: '3.4.1-0.1.0',
>   CORDOVA_PLATFORMS: '',
>   CORDOVA_PLUGINS: 'https://github.com/cdibened/filechooser.git',
>   CORDOVA_HOOK: '.../myApp/hooks/after_plugin_add/my_hook_script.js',
>   CORDOVA_CMDLINE: 'node /usr/local/bin/cordova plugin add https://github.com/cdibened/filechooser.git'
> {quote}
> The problem is when adding a plugin from a remote git repo, there's no easy way of finding
out WHICH plugin ID has just been added (which is quite essential for an after_plugin_add
hook). The hook only has access to a Git URL.
> We should provide the plugin ID to the hook:
> {quote}
>   CORDOVA_PLUGIN_ID: 'com.cesidiodibenedetto.filechooser'
> {quote}
> We can provide this information from {{cordova-lib/src/plugman/util/plugins.js}}, as
a simple process.env export. There are probably more elegant ways, but this would be a good
start. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message