cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimir-kotikov <>
Subject [GitHub] cordova-lib pull request: New plugin version selection implementat...
Date Tue, 01 Mar 2016 12:08:51 GMT
Github user vladimir-kotikov commented on a diff in the pull request:
    --- Diff: cordova-lib/src/cordova/plugin.js ---
    @@ -305,6 +289,50 @@ module.exports = function plugin(command, targets, opts) {
    +function determinePluginTarget(projectRoot, cfg, target, fetchOptions) {
    +    var parts = target.split('@');
    +    var id = parts[0];
    +    var version = parts[1];
    +    // If no version is specified, retrieve the version (or source) from config.xml
    +    if (!version && !cordova_util.isUrl(id) && !cordova_util.isDirectory(id))
    --- End diff --
    I'd rather reverse `if` condition here to return `target` immediately if there is no need
for any processing. This is just a matter of taste of course but IMO it would help to improve
code readability a bit. The same for L302 and L304

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