You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/06/27 22:16:28 UTC

spec commit: createmobilespec: use the new "platform add path/to/dir" instead of .cordova/config.json

Repository: cordova-mobile-spec
Updated Branches:
  refs/heads/master 005641907 -> b83b4da6d


createmobilespec: use the new "platform add path/to/dir" instead of .cordova/config.json


Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/b83b4da6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/b83b4da6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/b83b4da6

Branch: refs/heads/master
Commit: b83b4da6d382dbeee588b9bfa3d10e0768c29c08
Parents: 0056419
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri Jun 27 16:15:22 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Jun 27 16:15:22 2014 -0400

----------------------------------------------------------------------
 createmobilespec/createmobilespec.js | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/b83b4da6/createmobilespec/createmobilespec.js
----------------------------------------------------------------------
diff --git a/createmobilespec/createmobilespec.js b/createmobilespec/createmobilespec.js
index 43463a4..a579441 100755
--- a/createmobilespec/createmobilespec.js
+++ b/createmobilespec/createmobilespec.js
@@ -190,24 +190,19 @@ if (argv.plugman) {
     // Config.json file ---> linked to local libraries
     shelljs.pushd(cli_project_dir);
     var localPlatforms = {
-        "id" :    "org.apache.cordova",
-        "name" :  "mobilespec",
-        "lib" :   { "android" :      { "uri" : top_dir + "cordova-android" },
-                    "ios" :          { "uri" : top_dir + "cordova-ios" },
-                    "blackberry10" : { "uri" : top_dir + "cordova-blackberry" },
-                    "wp8" :          { "uri" : top_dir + "cordova-wp8" },
-                    "windows8" :     { "uri" : top_dir + "cordova-windows" }
-        }
+        "android" : top_dir + "cordova-android" ,
+        "ios" : top_dir + "cordova-ios" ,
+        "blackberry10" : top_dir + "cordova-blackberry" ,
+        "wp8" : top_dir + "cordova-wp8" ,
+        "windows8" : top_dir + "cordova-windows"
     };
-    if (!argv.global) {
-        JSON.stringify(localPlatforms).to(".cordova/config.json");
-    }
 
     // Executing platform Add
     console.log("Adding platforms...");
     platforms.forEach(function (platform) {
         console.log("Adding Platform: " + platform);
-        shelljs.exec(cli + " platform add " + platform + " --verbose");
+        var platformArg = argv.global ? platform : localPlatforms[platform];
+        shelljs.exec(cli + ' platform add "' + platformArg + '" --verbose');
     });
     shelljs.popd();
 }