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

ASF GitHub Bot commented on CB-6481:
------------------------------------

Github user csantanapr commented on the pull request:

    https://github.com/apache/cordova-lib/pull/55#issuecomment-52305148
  
    @purplecabbage That was one of my points, that context.cmdLine is not 
useful as a String.
    Why slide() and not just context.cmdLine = process.argv ? just to get a 
shallow copy?
    
    Not part of this pull request, but I think no where in inside cordova-lib 
the global object "process.argv" should be assume to be use. 
    I think is a responsibility of of who ever is calling cordova-lib which in 
this case is cordova-cli here: 
    https://github.com/apache/cordova-cli/blob/master/bin/cordova#L41
    
        addTs('start');
        var cli = require('../src/cli');
        cli(process.argv);
        addTs('end');
    
    then in  ../src/cli
    should parse and pass down remains/noneparsed of inputArgs down to the 
cordova-lib command.
    
    But for now for this pull request I +1 to do context.proc_argv = 
process.argv.slice()
    
    @sgrebnov you going to merge this pull request into master soon?
    



> Add unified hooks support for cordova app and plugins
> -----------------------------------------------------
>
>                 Key: CB-6481
>                 URL: https://issues.apache.org/jira/browse/CB-6481
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: CLI, Plugman
>            Reporter: Sergey Grebnov
>            Assignee: Sergey Grebnov
>
> As per "Proposal: hooks support for plugins" dev mail thread discussion
> Hi, I have an idea how we can add more flexibility to plugin developers.
> Note, right now we have Application Developers – someone who use Cordova for 
> developing applications and Plugin Developers – someone who creates plugins 
> so that Application Developers can use them. For Application Developers we 
> expose  hooks so that they can customize their build/package/etc process. I 
> want us to provide similar sort of flexibility to Plugin Developers so that 
> they can go beyond of <source/>, <framework/>  tags and get mechanism to add 
> custom installation,  build logic required by a plugin. Example usage will 
> include: downloading/compiling additional binaries, marking source file to be 
> copied to output dir, changing target build platform,  etc. At present time 
> the steps described could be only achieved by hooks manually added by 
> Application Developer, but the right way is to allow Plugin Developer to 
> expose this as part of plugin definition.
> Example configuration could look like
> ```
> <script type="postinstall" src="scripts/postinstall.js" />
> <script type="preinstall" src="scripts/preinstall.js" />
> <script type="install" src="scripts/install.js" />
> ```
> beforeinstall/preinstall – run before plugin is installed
> install/postinstall/afterinstall – run after plugin is installed
> uninstall – run after plugin is uninstalled



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

Reply via email to