cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevengill <...@git.apache.org>
Subject [GitHub] cordova-lib pull request: Improving prepare and build output
Date Wed, 11 May 2016 23:55:32 GMT
Github user stevengill commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/439#discussion_r62946762
  
    --- Diff: cordova-lib/src/hooks/HooksRunner.js ---
    @@ -141,6 +144,23 @@ function runScript(script, context) {
             // we assume we should use module loader for .js files
             script.useModuleLoader = path.extname(script.path).toLowerCase() == '.js';
         }
    +
    +    var source;
    +    var relativePath;
    +
    +    if (script.plugin) {
    +        source = 'plugin ' + script.plugin.id;
    +        relativePath = path.join('plugins', script.plugin.id, script.path);
    +    } else if (script.useModuleLoader) {
    +        source = 'config.xml';
    +        relativePath = path.normalize(script.path);
    +    } else {
    +        source = 'hooks directory';
    +        relativePath = path.join('hooks', context.hook, script.path);
    +    }
    +
    +    events.emit('verbose', 'Executing script found in ' + source + ' for hook "' + context.hook
+ '": ' + relativePath);
    --- End diff --
    
    Very handy!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message