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

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

Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/170#discussion_r25095044
  
    --- Diff: cordova-lib/src/cordova/platform.js ---
    @@ -174,6 +181,24 @@ function addHelper(cmd, hooksRunner, projectRoot, 
targets, opts) {
         });
     }
     
    +function save(hooksRunner, projectRoot, opts) {
    +    var xml = cordova_util.projectConfig(projectRoot);
    +    var cfg = new ConfigParser(xml);
    +
    +    // First, remove all platforms that are already in config.xml
    +    cfg.getEngines().map(function(engine){
    +        cfg.removeEngine();
    +    });
    +
    +    // Save installed platforms into config.xml
    +    return 
platformMetadata.getPlatformVersions(projectRoot).then(function(platformVersions){
    +        platformVersions.map(function(platVer){
    --- End diff --
    
    `map` vs `forEach` again


> 'cordova platform save' : should save all installed platforms to config.xml
> ---------------------------------------------------------------------------
>
>                 Key: CB-8499
>                 URL: https://issues.apache.org/jira/browse/CB-8499
>             Project: Apache Cordova
>          Issue Type: New Feature
>            Reporter: Omar Mefire
>            Assignee: Omar Mefire
>
> In addition to using 'cordova platform add android --save' to both add and 
> save a platform to config.xml, It would be useful to have a way to 'mass 
> save' already installed platforms to config.xml.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to