cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agrieve <...@git.apache.org>
Subject [GitHub] cordova-lib pull request: CB-8551 npm registry integration for fet...
Date Tue, 03 Mar 2015 14:25:01 GMT
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/175#discussion_r25690367
  
    --- Diff: cordova-lib/src/cordova/plugin.js ---
    @@ -238,7 +239,21 @@ module.exports = function plugin(command, targets, opts) {
                     return opts.plugins.reduce(function(soFar, target) {
                         // Check if we have the plugin.
                         if (plugins.indexOf(target) < 0) {
    -                        return Q.reject(new CordovaError('Plugin "' + target + '" is
not present in the project. See `'+cordova_util.binname+' plugin list`.'));
    +                        // Convert target from package-name to package-id if necessary
    +                        var keys = Object.keys(pluginMapper);
    +                        //Traverse through pluginMapper values to see if it equals our
target.
    +                        //Cordova-plugin-device would get changes to org.apache.cordova.device
    +                        for (var i = 0; i < keys.length; i++) {
    --- End diff --
    
    Might as well export the reverse mapping from pluginMapper so that you don't need to do
this linear search. Exposing the map as a sub-key of the module is a good idea anyways, since
doing it top-level restricts you from ever adding another symbol to it.


---
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