cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimir-kotikov <...@git.apache.org>
Subject [GitHub] cordova-lib pull request: CB-9617 Do not restore plugins immediate...
Date Mon, 14 Sep 2015 14:35:28 GMT
Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/304#discussion_r39400734
  
    --- Diff: cordova-lib/src/cordova/plugin.js ---
    @@ -283,6 +283,31 @@ module.exports = function plugin(command, targets, opts) {
         }
     };
     
    +/**
    + * Calls `platformApi.prepare` for each platform in project
    + *
    + * @param   {string[]}  platformList  List of platforms, added to current project
    + * @param   {string}    projectRoot   Project root directory
    + *
    + * @return  {Promise}
    + */
    +function preparePlatforms (platformList, projectRoot) {
    +    return Q.all(platformList.map(function(platform) {
    +        // TODO: this need to be replaced by real projectInfo
    +        // instance for current project.
    +        var project = {
    +            root: projectRoot,
    +            projectConfig: new ConfigParser(cordova_util.projectConfig(projectRoot)),
    +            locations: {
    +                plugins: path.join(projectRoot, 'plugins'),
    +                www: cordova_util.projectWww(projectRoot)
    +            }
    +        };
    +
    +        return platforms.getPlatformApi(platform).prepare(project);
    +    }));
    +}
    +
    --- End diff --
    
    Yup, factored this to separate function. Another thing that i've missed, is that we still
need to do a `browserify` if corresponding option is specified. 


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