cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bennma...@apache.org
Subject git commit: Updated cli to use one repository for windows phone
Date Thu, 27 Jun 2013 00:58:29 GMT
Updated Branches:
  refs/heads/master2 f01d66a24 -> 7cfed618f


Updated cli to use one repository for windows phone


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

Branch: refs/heads/master2
Commit: 7cfed618ffceb791598b93f3ddd79fe5ebdcbbbe
Parents: f01d66a
Author: Benn Mapes <benn.mapes@gmail.com>
Authored: Wed Jun 26 17:58:02 2013 -0700
Committer: Benn Mapes <benn.mapes@gmail.com>
Committed: Wed Jun 26 17:58:02 2013 -0700

----------------------------------------------------------------------
 platforms.js               |  2 +-
 spec/platform.spec.js      | 10 +++++-----
 src/metadata/wp7_parser.js |  6 +++---
 src/metadata/wp8_parser.js |  4 ++--
 src/platform.js            |  2 ++
 5 files changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/7cfed618/platforms.js
----------------------------------------------------------------------
diff --git a/platforms.js b/platforms.js
index 2a0950d..13709d4 100644
--- a/platforms.js
+++ b/platforms.js
@@ -30,7 +30,7 @@ module.exports = {
     }, 
     'wp7' : {
         parser : require('./src/metadata/wp7_parser'),
-        url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-wp7.git',
+        url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git',
         version: '2.9.0'
     },
     'wp8' : {

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/7cfed618/spec/platform.spec.js
----------------------------------------------------------------------
diff --git a/spec/platform.spec.js b/spec/platform.spec.js
index 8b2a5dc..b4595d5 100644
--- a/spec/platform.spec.js
+++ b/spec/platform.spec.js
@@ -128,23 +128,23 @@ 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]*.bin.create/gi);
+                expect(exec.mostRecentCall.args[0]).toMatch(/lib.wp8.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() {
                 load.andCallThrough();
                 config_read.andReturn({
                     lib:{
-                        'wp7':{
+                        'wp8':{
                             uri:'haha',
                             id:'phonegap',
                             version:'bleeding edge'
                         }
                     }
                 });
-                cordova.platform('add', 'wp7');
-                expect(load_custom).toHaveBeenCalledWith('haha', 'phonegap', 'wp7', 'bleeding
edge', jasmine.any(Function));
-                expect(exec.mostRecentCall.args[0]).toMatch(/lib.wp7.phonegap.bleeding edge.bin.create/gi);
+                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]).toContain(project_dir);
             });
         });

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/7cfed618/src/metadata/wp7_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/wp7_parser.js b/src/metadata/wp7_parser.js
index 909b3c5..9de35d4 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, 'wp7', 'cordova', require('../../platforms').wp7.version);
+    var lib_path = path.join(util.libDirectory, 'wp8', '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') + '"';
@@ -154,10 +154,10 @@ 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, 'wp7', 'cordova', require('../../platforms').wp7.version);
+        var lib_path = path.join(util.libDirectory, 'wp8', '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, 'templates', 'standalone', 'www', 'cordova.js');
+        var cordovajs_path = path.join(lib_path, 'common', 'www', 'cordova.js');
         fs.writeFileSync(path.join(this.www_dir(), 'cordova.js'), fs.readFileSync(cordovajs_path,
'utf-8'), 'utf-8');
         this.update_csproj();
     },

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/7cfed618/src/metadata/wp8_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/wp8_parser.js b/src/metadata/wp8_parser.js
index 5e8d7f3..7ac62a5 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);
+    var lib_path = path.join(util.libDirectory, 'wp8', '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 = {
         var lib_path = path.join(util.libDirectory, 'wp8', '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, 'templates', 'standalone', 'www', 'cordova.js');
+        var cordovajs_path = path.join(lib_path, 'common', 'www', 'cordova.js');
         fs.writeFileSync(path.join(this.www_dir(), 'cordova.js'), fs.readFileSync(cordovajs_path,
'utf-8'), 'utf-8');
         this.update_csproj();
     },

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/7cfed618/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index 2057a77..dec34a6 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -218,6 +218,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');
                 var args = (target=='ios') ? '--arc' : '';
                 var pkg = cfg.packageName().replace(/[^\w.]/g,'_');
                 var name = cfg.name().replace(/\W/g,'_');


Mime
View raw message