You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2013/07/31 00:11:31 UTC

git commit: Changed references to windows phone repo from wp8 to wp

Updated Branches:
  refs/heads/master 44d21ae8a -> bd1e9c8d6


Changed references to windows phone repo from wp8 to wp


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

Branch: refs/heads/master
Commit: bd1e9c8d6070ccc6241bff6acf118c882ed12503
Parents: 44d21ae
Author: Benn Mapes <be...@gmail.com>
Authored: Tue Jul 30 15:06:09 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Tue Jul 30 15:06:09 2013 -0700

----------------------------------------------------------------------
 spec/platform.spec.js      | 4 ++--
 src/lazy_load.js           | 3 ++-
 src/metadata/wp7_parser.js | 4 ++--
 src/metadata/wp8_parser.js | 4 ++--
 src/platform.js            | 4 ++--
 5 files changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/bd1e9c8d/spec/platform.spec.js
----------------------------------------------------------------------
diff --git a/spec/platform.spec.js b/spec/platform.spec.js
index a2b65fc..cded1c6 100644
--- a/spec/platform.spec.js
+++ b/spec/platform.spec.js
@@ -128,7 +128,7 @@ describe('platform command', function() {
                 expect(exec.mostRecentCall.args[0]).toMatch(/lib.android.cordova.\d.\d.\d[\d\w]*.bin.create/gi);
                 expect(exec.mostRecentCall.args[0]).toContain(project_dir);
                 cordova.platform('add', 'wp8');
-                expect(exec.mostRecentCall.args[0]).toMatch(/lib.wp8.cordova.\d.\d.\d[\d\w]*.wp8.bin.create/gi);
+                expect(exec.mostRecentCall.args[0]).toMatch(/lib.wp.cordova.\d.\d.\d[\d\w]*.wp8.bin.create/gi);
                 expect(exec.mostRecentCall.args[0]).toContain(project_dir);
             });
             it('should call into lazy_load.custom if there is a user-specified configruation for consuming custom libraries', function() {
@@ -144,7 +144,7 @@ describe('platform command', function() {
                 });
                 cordova.platform('add', 'wp8');
                 expect(load_custom).toHaveBeenCalledWith('haha', 'phonegap', 'wp8', 'bleeding edge', jasmine.any(Function));
-                expect(exec.mostRecentCall.args[0]).toMatch(/lib.wp8.phonegap.bleeding edge.wp8.bin.create/gi);
+                expect(exec.mostRecentCall.args[0]).toMatch(/lib.wp.phonegap.bleeding edge.wp8.bin.create/gi);
                 expect(exec.mostRecentCall.args[0]).toContain(project_dir);
             });
         });

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/bd1e9c8d/src/lazy_load.js
----------------------------------------------------------------------
diff --git a/src/lazy_load.js b/src/lazy_load.js
index bea1a63..11f6dac 100644
--- a/src/lazy_load.js
+++ b/src/lazy_load.js
@@ -50,7 +50,8 @@ module.exports = {
         });
     },
     custom:function(url, id, platform, version, callback) {
-        var download_dir = (platform == 'wp7'? path.join(util.libDirectory, 'wp8', id, version) : path.join(util.libDirectory, platform, id, version));
+        var download_dir = (platform == 'wp7' || platform == 'wp8' ? path.join(util.libDirectory, 'wp', id, version) :
+                                                                     path.join(util.libDirectory, platform, id, version));
         if (fs.existsSync(download_dir)) {
             events.emit('log', id + ' library for "' + platform + '" already exists. No need to download. Continuing.');
             if (callback) return callback();

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/bd1e9c8d/src/metadata/wp7_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/wp7_parser.js b/src/metadata/wp7_parser.js
index 22319b9..f96ed08 100644
--- a/src/metadata/wp7_parser.js
+++ b/src/metadata/wp7_parser.js
@@ -42,7 +42,7 @@ module.exports = function wp7_parser(project) {
 
 module.exports.check_requirements = function(project_root, callback) {
     events.emit('log', 'Checking wp7 requirements...');
-    var lib_path = path.join(util.libDirectory, 'wp8', 'cordova', require('../../platforms').wp7.version, 'wp7');
+    var lib_path = path.join(util.libDirectory, 'wp', 'cordova', require('../../platforms').wp7.version, 'wp7');
     var custom_path = config.has_custom_path(project_root, 'wp7');
     if (custom_path) lib_path = custom_path;
     var command = '"' + path.join(lib_path, 'bin', 'check_reqs') + '"';
@@ -157,7 +157,7 @@ module.exports.prototype = {
         shell.cp('-rf', project_www, this.wp7_proj_dir);
 
         // copy over wp7 lib's cordova.js
-        var lib_path = path.join(util.libDirectory, 'wp8', 'cordova', require('../../platforms').wp7.version);
+        var lib_path = path.join(util.libDirectory, 'wp', 'cordova', require('../../platforms').wp7.version);
         var custom_path = config.has_custom_path(project_root, 'wp7');
         if (custom_path) lib_path = custom_path;
         var cordovajs_path = path.join(lib_path, 'common', 'www', 'cordova.js');

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/bd1e9c8d/src/metadata/wp8_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/wp8_parser.js b/src/metadata/wp8_parser.js
index 6271c40..fe97428 100644
--- a/src/metadata/wp8_parser.js
+++ b/src/metadata/wp8_parser.js
@@ -42,7 +42,7 @@ module.exports = function wp8_parser(project) {
 
 module.exports.check_requirements = function(project_root, callback) {
     events.emit('log', 'Checking wp8 requirements...');
-    var lib_path = path.join(util.libDirectory, 'wp8', 'cordova', require('../../platforms').wp8.version, 'wp8');
+    var lib_path = path.join(util.libDirectory, 'wp', 'cordova', require('../../platforms').wp8.version, 'wp8');
     var custom_path = config.has_custom_path(project_root, 'wp8');
     if (custom_path) lib_path = custom_path;
     var command = '"' + path.join(lib_path, 'bin', 'check_reqs') + '"';
@@ -158,7 +158,7 @@ module.exports.prototype = {
         shell.cp('-rf', project_www, this.wp8_proj_dir);
 
         // copy over wp8 lib's cordova.js
-        var lib_path = path.join(util.libDirectory, 'wp8', 'cordova', require('../../platforms').wp8.version);
+        var lib_path = path.join(util.libDirectory, 'wp', 'cordova', require('../../platforms').wp8.version);
         var custom_path = config.has_custom_path(project_root, 'wp8');
         if (custom_path) lib_path = custom_path;
         var cordovajs_path = path.join(lib_path, 'common', 'www', 'cordova.js');

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/bd1e9c8d/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index 13ff883..19f558a 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -217,8 +217,8 @@ function call_into_create(target, projectRoot, cfg, id, version, callback, end)
                 // Create a platform app using the ./bin/create scripts that exist in each repo.
                 // Run platform's create script
                 var bin = path.join(cordova_util.libDirectory, target, id, version, 'bin', 'create');
-                if(target == 'wp7') bin = path.join(cordova_util.libDirectory, 'wp8', id, version, 'wp7', 'bin', 'create');
-                if(target == 'wp8') bin = path.join(cordova_util.libDirectory, target, id, version, 'wp8', 'bin', 'create');
+                if(target == 'wp7') bin = path.join(cordova_util.libDirectory, 'wp', id, version, 'wp7', 'bin', 'create');
+                if(target == 'wp8') bin = path.join(cordova_util.libDirectory, 'wp', id, version, 'wp8', 'bin', 'create');
                 var args = (target=='ios') ? '--arc' : '';
                 var pkg = cfg.packageName().replace(/[^\w.]/g,'_');
                 var name = cfg.name();