cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [1/2] git commit: CB-5647 Remove concept of .staging dir & install directly to www/
Date Thu, 27 Feb 2014 01:53:48 GMT
Repository: cordova-cli
Updated Branches:
  refs/heads/master 860757f85 -> aa7fe855a


CB-5647 Remove concept of .staging dir & install directly to www/

Plugman now copies <asset> in prepare (instead of install).
Github: close #130


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

Branch: refs/heads/master
Commit: b709767515bb6a516054e0960c0fa4d6a6551400
Parents: 860757f
Author: Mark Koudritsky <kamrik@chromium.org>
Authored: Wed Feb 26 14:18:48 2014 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Wed Feb 26 20:40:39 2014 -0500

----------------------------------------------------------------------
 spec/metadata/android_parser.spec.js    | 23 +----------------------
 spec/metadata/blackberry_parser.spec.js | 24 +-----------------------
 spec/metadata/ios_parser.spec.js        | 28 +---------------------------
 spec/metadata/windows8_parser.spec.js   | 24 +-----------------------
 spec/metadata/wp7_parser.spec.js        | 24 +-----------------------
 spec/metadata/wp8_parser.spec.js        | 24 +-----------------------
 spec/plugin.spec.js                     | 14 +++++++++-----
 src/metadata/amazon_fireos_parser.js    | 14 +-------------
 src/metadata/android_parser.js          | 14 --------------
 src/metadata/blackberry10_parser.js     | 14 --------------
 src/metadata/firefoxos_parser.js        | 13 -------------
 src/metadata/ios_parser.js              | 14 --------------
 src/metadata/ubuntu_parser.js           | 16 ----------------
 src/metadata/windows8_parser.js         | 16 ++--------------
 src/metadata/wp7_parser.js              | 16 ++--------------
 src/metadata/wp8_parser.js              | 12 ------------
 src/platform.js                         |  3 +--
 src/plugin.js                           |  3 +--
 18 files changed, 22 insertions(+), 274 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/spec/metadata/android_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/android_parser.spec.js b/spec/metadata/android_parser.spec.js
index 498c018..47c48a6 100644
--- a/spec/metadata/android_parser.spec.js
+++ b/spec/metadata/android_parser.spec.js
@@ -152,11 +152,6 @@ describe('android project parser', function() {
                 expect(p.www_dir()).toEqual(path.join(android_proj, 'assets', 'www'));
             });
         });
-        describe('staging_dir method', function() {
-            it('should return .staging/www', function() {
-                expect(p.staging_dir()).toEqual(path.join(android_proj, '.staging', 'www'));
-            });
-        });
         describe('config_xml method', function() {
             it('should return the location of the config.xml', function() {
                 expect(p.config_xml()).toEqual(p.android_config);
@@ -180,24 +175,12 @@ describe('android project parser', function() {
                 expect(cp).toHaveBeenCalled();
             });
         });
-        describe('update_staging method', function() {
-            it('should do nothing if staging dir does not exist', function() {
-                exists.andReturn(false);
-                p.update_staging();
-                expect(cp).not.toHaveBeenCalled();
-            });
-            it('should copy the staging dir into www if staging dir exists', function() {
-                p.update_staging();
-                expect(cp).toHaveBeenCalled();
-            });
-        });
         describe('update_project method', function() {
-            var config, www, overrides, staging, svn;
+            var config, www, overrides, svn;
             beforeEach(function() {
                 config = spyOn(p, 'update_from_config');
                 www = spyOn(p, 'update_www');
                 overrides = spyOn(p, 'update_overrides');
-                staging = spyOn(p, 'update_staging');
                 svn = spyOn(util, 'deleteSvnFolders');
             });
             it('should call update_from_config', function() {
@@ -219,10 +202,6 @@ describe('android project parser', function() {
                 p.update_project();
                 expect(overrides).toHaveBeenCalled();
             });
-            it('should call update_staging', function() {
-                p.update_project();
-                expect(staging).toHaveBeenCalled();
-            });
             it('should call deleteSvnFolders', function() {
                 p.update_project();
                 expect(svn).toHaveBeenCalled();

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/spec/metadata/blackberry_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/blackberry_parser.spec.js b/spec/metadata/blackberry_parser.spec.js
index 6927929..0a571e7 100644
--- a/spec/metadata/blackberry_parser.spec.js
+++ b/spec/metadata/blackberry_parser.spec.js
@@ -160,11 +160,6 @@ describe('blackberry10 project parser', function() {
                 expect(p.www_dir()).toEqual(path.join(bb_proj, 'www'));
             });
         });
-        describe('staging_dir method', function() {
-            it('should return .staging/www', function() {
-                expect(p.staging_dir()).toEqual(path.join(bb_proj, '.staging', 'www'));
-            });
-        });
         describe('config_xml method', function() {
             it('should return the location of the config.xml', function() {
                 expect(p.config_xml()).toEqual(path.join(proj, 'platforms', 'blackberry10',
'www', 'config.xml'));
@@ -189,24 +184,12 @@ describe('blackberry10 project parser', function() {
                 expect(cp).toHaveBeenCalledWith('-rf', path.join(proj, 'merges', 'blackberry10',
'*'), path.join(proj, 'platforms', 'blackberry10', 'www'));
             });
         });
-        describe('update_staging method', function() {
-            it('should do nothing if staging dir does not exist', function() {
-                exists.andReturn(false);
-                p.update_staging();
-                expect(cp).not.toHaveBeenCalled();
-            });
-            it('should copy the staging dir into www if staging dir exists', function() {
-                p.update_staging();
-                expect(cp).toHaveBeenCalledWith('-rf', path.join(proj, 'platforms', 'blackberry10',
'.staging', 'www', '*'), path.join(proj, 'platforms', 'blackberry10', 'www'));
-            });
-        });
         describe('update_project method', function() {
-            var config, www, overrides, staging, svn, parse, get_env, write_env;
+            var config, www, overrides, svn, parse, get_env, write_env;
             beforeEach(function() {
                 config = spyOn(p, 'update_from_config');
                 www = spyOn(p, 'update_www');
                 overrides = spyOn(p, 'update_overrides');
-                staging = spyOn(p, 'update_staging');
                 svn = spyOn(util, 'deleteSvnFolders');
                 parse = spyOn(JSON, 'parse').andReturn({blackberry:{qnx:{}}});
             });
@@ -232,11 +215,6 @@ describe('blackberry10 project parser', function() {
                     expect(overrides).toHaveBeenCalled();
                 });
             });
-            it('should call update_staging', function(done) {
-                wrapper(p.update_project(), done, function() {
-                    expect(staging).toHaveBeenCalled();
-                });
-            });
             it('should call deleteSvnFolders', function(done) {
                 wrapper(p.update_project(), done, function() {
                     expect(svn).toHaveBeenCalled();

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/spec/metadata/ios_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/ios_parser.spec.js b/spec/metadata/ios_parser.spec.js
index 54b912c..79f6c9f 100644
--- a/spec/metadata/ios_parser.spec.js
+++ b/spec/metadata/ios_parser.spec.js
@@ -132,11 +132,6 @@ describe('ios project parser', function () {
                 expect(p.www_dir()).toEqual(path.join(ios_proj, 'www'));
             });
         });
-        describe('staging_dir method', function() {
-            it('should return .staging/www', function() {
-                expect(p.staging_dir()).toEqual(path.join(ios_proj, '.staging', 'www'));
-            });
-        });
         describe('config_xml method', function() {
             it('should return the location of the config.xml', function() {
                 expect(p.config_xml()).toEqual(path.join(ios_proj, 'test', 'config.xml'));
@@ -164,28 +159,12 @@ describe('ios project parser', function () {
                 expect(cp).toHaveBeenCalled();
             });
         });
-        describe('update_staging method', function() {
-            var exists;
-            beforeEach(function() {
-                exists = spyOn(fs, 'existsSync').andReturn(true);
-            });
-            it('should do nothing if staging dir does not exist', function() {
-                exists.andReturn(false);
-                p.update_staging();
-                expect(cp).not.toHaveBeenCalled();
-            });
-            it('should copy the staging dir into www if staging dir exists', function() {
-                p.update_staging();
-                expect(cp).toHaveBeenCalled();
-            });
-        });
         describe('update_project method', function() {
-            var config, www, overrides, staging, svn;
+            var config, www, overrides, svn;
             beforeEach(function() {
                 config = spyOn(p, 'update_from_config').andReturn(Q());
                 www = spyOn(p, 'update_www');
                 overrides = spyOn(p, 'update_overrides');
-                staging = spyOn(p, 'update_staging');
                 svn = spyOn(util, 'deleteSvnFolders');
             });
             it('should call update_from_config', function(done) {
@@ -210,11 +189,6 @@ describe('ios project parser', function () {
                     expect(overrides).toHaveBeenCalled();
                 });
             });
-            it('should call update_staging', function(done) {
-                wrapper(p.update_project(), done, function() {
-                    expect(staging).toHaveBeenCalled();
-                });
-            });
             it('should call deleteSvnFolders', function(done) {
                 wrapper(p.update_project(), done, function() {
                     expect(svn).toHaveBeenCalled();

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/spec/metadata/windows8_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/windows8_parser.spec.js b/spec/metadata/windows8_parser.spec.js
index 6f56b78..d59e60a 100644
--- a/spec/metadata/windows8_parser.spec.js
+++ b/spec/metadata/windows8_parser.spec.js
@@ -148,11 +148,6 @@ describe('windows8 project parser', function() {
                 expect(parser.www_dir()).toEqual(path.join(windows8_proj, 'www'));
             });
         });
-        describe('staging_dir method', function() {
-            it('should return .staging/www', function() {
-                expect(parser.staging_dir()).toEqual(path.join(windows8_proj, '.staging',
'www'));
-            });
-        });
         describe('update_www method', function() {
             var update_jsproj;
             beforeEach(function() {
@@ -164,24 +159,12 @@ describe('windows8 project parser', function() {
                 expect(cp).toHaveBeenCalled();
             });
         });
-        describe('update_staging method', function() {
-            it('should do nothing if staging dir does not exist', function() {
-                exists.andReturn(false);
-                parser.update_staging();
-                expect(cp).not.toHaveBeenCalled();
-            });
-            it('should copy the staging dir into www if staging dir exists', function() {
-                parser.update_staging();
-                expect(cp).toHaveBeenCalled();
-            });
-        });
         describe('update_project method', function() {
-            var config, www, overrides, staging, svn;
+            var config, www, overrides, svn;
             beforeEach(function() {
                 config = spyOn(parser, 'update_from_config');
                 www = spyOn(parser, 'update_www');
                 www = spyOn(parser, 'update_jsproj');
-                staging = spyOn(parser, 'update_staging');
                 svn = spyOn(util, 'deleteSvnFolders');
                 exists.andReturn(false);
             });
@@ -196,11 +179,6 @@ describe('windows8 project parser', function() {
                     expect(err).toEqual(err);
                 });
             });
-            it('should call update_staging', function(done) {
-                wrapper(parser.update_project(), done, function() {
-                    expect(staging).toHaveBeenCalled();
-                });
-            });
             it('should call deleteSvnFolders', function(done) {
                 wrapper(parser.update_project(), done, function() {
                     expect(svn).toHaveBeenCalled();

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/spec/metadata/wp7_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/wp7_parser.spec.js b/spec/metadata/wp7_parser.spec.js
index 03fda18..fc1eb66 100644
--- a/spec/metadata/wp7_parser.spec.js
+++ b/spec/metadata/wp7_parser.spec.js
@@ -155,11 +155,6 @@ describe('wp7 project parser', function() {
                 expect(p.www_dir()).toEqual(path.join(wp7_proj, 'www'));
             });
         });
-        describe('staging_dir method', function() {
-            it('should return .staging/www', function() {
-                expect(p.staging_dir()).toEqual(path.join(wp7_proj, '.staging', 'www'));
-            });
-        });
         describe('config_xml method', function() {
             it('should return the location of the config.xml', function() {
                 expect(p.config_xml()).toEqual(path.join(wp7_proj, 'config.xml'));
@@ -176,23 +171,11 @@ describe('wp7 project parser', function() {
                 expect(cp).toHaveBeenCalled();
             });
         });
-        describe('update_staging method', function() {
-            it('should do nothing if staging dir does not exist', function() {
-                exists.andReturn(false);
-                p.update_staging();
-                expect(cp).not.toHaveBeenCalled();
-            });
-            it('should copy the staging dir into www if staging dir exists', function() {
-                p.update_staging();
-                expect(cp).toHaveBeenCalled();
-            });
-        });
         describe('update_project method', function() {
-            var config, www, overrides, staging, svn, cfg, csproj;
+            var config, www, overrides, svn, cfg, csproj;
             beforeEach(function() {
                 config = spyOn(p, 'update_from_config');
                 www = spyOn(p, 'update_www');
-                staging = spyOn(p, 'update_staging');
                 svn = spyOn(util, 'deleteSvnFolders');
                 csproj = spyOn(p, 'update_csproj');
                 exists.andReturn(false);
@@ -214,11 +197,6 @@ describe('wp7 project parser', function() {
                     expect(www).not.toHaveBeenCalled();
                 });
             });
-            it('should call update_staging', function(done) {
-                wrapper(p.update_project(), done, function() {
-                    expect(staging).toHaveBeenCalled();
-                });
-            });
             it('should call deleteSvnFolders', function(done) {
                 wrapper(p.update_project(), done, function() {
                     expect(svn).toHaveBeenCalled();

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/spec/metadata/wp8_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/wp8_parser.spec.js b/spec/metadata/wp8_parser.spec.js
index aa3b0c4..b103a79 100644
--- a/spec/metadata/wp8_parser.spec.js
+++ b/spec/metadata/wp8_parser.spec.js
@@ -155,11 +155,6 @@ describe('wp8 project parser', function() {
                 expect(p.www_dir()).toEqual(path.join(wp8_proj, 'www'));
             });
         });
-        describe('staging_dir method', function() {
-            it('should return .staging/www', function() {
-                expect(p.staging_dir()).toEqual(path.join(wp8_proj, '.staging', 'www'));
-            });
-        });
         describe('config_xml method', function() {
             it('should return the location of the config.xml', function() {
                 expect(p.config_xml()).toEqual(path.join(wp8_proj, 'config.xml'));
@@ -176,23 +171,11 @@ describe('wp8 project parser', function() {
                 expect(cp).toHaveBeenCalled();
             });
         });
-        describe('update_staging method', function() {
-            it('should do nothing if staging dir does not exist', function() {
-                exists.andReturn(false);
-                p.update_staging();
-                expect(cp).not.toHaveBeenCalled();
-            });
-            it('should copy the staging dir into www if staging dir exists', function() {
-                p.update_staging();
-                expect(cp).toHaveBeenCalled();
-            });
-        });
         describe('update_project method', function() {
-            var config, www, overrides, staging, svn, csproj;
+            var config, www, overrides, svn, csproj;
             beforeEach(function() {
                 config = spyOn(p, 'update_from_config');
                 www = spyOn(p, 'update_www');
-                staging = spyOn(p, 'update_staging');
                 svn = spyOn(util, 'deleteSvnFolders');
                 csproj = spyOn(p, 'update_csproj');
                 exists.andReturn(false);
@@ -214,11 +197,6 @@ describe('wp8 project parser', function() {
                     expect(www).not.toHaveBeenCalled();
                 });
             });
-            it('should call update_staging', function(done) {
-                wrapper(p.update_project(), done, function() {
-                    expect(staging).toHaveBeenCalled();
-                });
-            });
             it('should call deleteSvnFolders', function(done) {
                 wrapper(p.update_project(), done, function() {
                     expect(svn).toHaveBeenCalled();

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/spec/plugin.spec.js
----------------------------------------------------------------------
diff --git a/spec/plugin.spec.js b/spec/plugin.spec.js
index e611e36..d427f00 100644
--- a/spec/plugin.spec.js
+++ b/spec/plugin.spec.js
@@ -57,9 +57,7 @@ describe('plugin command', function() {
         fire = spyOn(hooker.prototype, 'fire').andReturn(Q());
         supported_platforms.forEach(function(p) {
             parsers[p] = jasmine.createSpy(p + ' update_project').andReturn(Q());
-            spyOn(platforms[p], 'parser').andReturn({
-                staging_dir:function(){return ''}
-            });
+            spyOn(platforms[p], 'parser').andReturn({});
         });
         list_platforms = spyOn(util, 'listPlatforms').andReturn(supported_platforms);
         find_plugins = spyOn(util, 'findPlugins').andReturn(sample_plugins);
@@ -164,7 +162,13 @@ describe('plugin command', function() {
             it('should pass down variables into plugman', function(done) {
                 cordova.raw.plugin('add', "one", "--variable", "foo=bar").then(function()
{
                     supported_platforms.forEach(function(plat) {
-                        expect(plugman_install).toHaveBeenCalledWith((plat=='blackberry'?'blackberry10':plat),
path.join(project_dir, 'platforms', plat), "one", plugins_dir, {www_dir: jasmine.any(String),
cli_variables: { FOO: "bar"}});
+                        expect(plugman_install).toHaveBeenCalledWith(
+                            (plat=='blackberry'?'blackberry10':plat),
+                            path.join(project_dir, 'platforms', plat),
+                            "one",
+                            plugins_dir,
+                            {cli_variables: { FOO: "bar"}}
+                        );
                     });
                 }, function(err) {
                     expect(err).toBeUndefined();
@@ -207,7 +211,7 @@ describe('plugin command', function() {
                 cordova.raw.plugin('rm', sample_plugins).then(function() {
                     sample_plugins.forEach(function(plug) {
                         subset.forEach(function(plat) {
-                            expect(uninstallPlatform).toHaveBeenCalledWith(plat, path.join(project_dir,
'platforms', plat), plug, plugins_dir, jasmine.any(Object));
+                            expect(uninstallPlatform).toHaveBeenCalledWith(plat, path.join(project_dir,
'platforms', plat), plug, plugins_dir);
                         });
                     });
                 }, function(err) {

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/src/metadata/amazon_fireos_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/amazon_fireos_parser.js b/src/metadata/amazon_fireos_parser.js
index 93d3ea7..7e9d36d 100644
--- a/src/metadata/amazon_fireos_parser.js
+++ b/src/metadata/amazon_fireos_parser.js
@@ -102,10 +102,6 @@ module.exports.prototype = {
         return path.join(this.path, 'assets', 'www');
     },
 
-    staging_dir: function() {
-        return path.join(this.path, '.staging', 'www');
-    },
-
     config_xml:function(){
         return this.android_config;
     },
@@ -115,7 +111,7 @@ module.exports.prototype = {
         var jsPath = path.join(libDir, 'framework', 'assets', 'www', 'cordova.js');
         return path.resolve(jsPath);
     },
-    
+
     // Replace the www dir with contents of platform_www and app www.
     update_www:function() {
         var projectRoot = util.isCordova(this.path);
@@ -141,13 +137,6 @@ module.exports.prototype = {
         }
     },
 
-    // update the overrides folder into the www folder
-    update_staging:function() {
-        if (fs.existsSync(this.staging_dir())) {
-            var staging = path.join(this.staging_dir(), '*');
-            shell.cp('-rf', staging, this.www_dir());
-        }
-    },
 
     // Returns a promise.
     update_project:function(cfg) {
@@ -158,7 +147,6 @@ module.exports.prototype = {
             return Q.reject(e);
         }
         this.update_overrides();
-        this.update_staging();
         // delete any .svn folders copied over
         util.deleteSvnFolders(platformWww);
         return Q();

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/src/metadata/android_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/android_parser.js b/src/metadata/android_parser.js
index 286c439..914857d 100644
--- a/src/metadata/android_parser.js
+++ b/src/metadata/android_parser.js
@@ -125,10 +125,6 @@ module.exports.prototype = {
         return path.join(this.path, 'assets', 'www');
     },
 
-    staging_dir: function() {
-        return path.join(this.path, '.staging', 'www');
-    },
-
     config_xml:function(){
         return this.android_config;
     },
@@ -164,21 +160,12 @@ module.exports.prototype = {
         }
     },
 
-    // update the overrides folder into the www folder
-    update_staging:function() {
-        if (fs.existsSync(this.staging_dir())) {
-            var staging = path.join(this.staging_dir(), '*');
-            shell.cp('-rf', staging, this.www_dir());
-        }
-    },
-
     // Returns a promise.
     update_project:function(cfg) {
         var platformWww = path.join(this.path, 'assets');
         try {
             this.update_from_config(cfg);
             this.update_overrides();
-            this.update_staging();
         } catch(e) {
             return Q.reject(e);
         }
@@ -187,4 +174,3 @@ module.exports.prototype = {
         return Q();
     }
 };
-

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/src/metadata/blackberry10_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/blackberry10_parser.js b/src/metadata/blackberry10_parser.js
index 7618fff..592b862 100644
--- a/src/metadata/blackberry10_parser.js
+++ b/src/metadata/blackberry10_parser.js
@@ -71,7 +71,6 @@ module.exports.prototype = {
             return Q.reject(e);
         }
         self.update_overrides();
-        self.update_staging();
         util.deleteSvnFolders(this.www_dir());
         return Q();
     },
@@ -81,10 +80,6 @@ module.exports.prototype = {
         return path.join(this.path, 'www');
     },
 
-    staging_dir: function() {
-        return path.join(this.path, '.staging', 'www');
-    },
-
     config_xml:function(){
         return this.config_path;
     },
@@ -122,13 +117,4 @@ module.exports.prototype = {
             shell.cp('-rf', overrides, this.www_dir());
         }
     },
-
-    // update the overrides folder into the www folder
-    update_staging:function() {
-        var projectRoot = util.isCordova(this.path);
-        if (fs.existsSync(this.staging_dir())) {
-            var staging = path.join(this.staging_dir(), '*');
-            shell.cp('-rf', staging, this.www_dir());
-        }
-    }
 };

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/src/metadata/firefoxos_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/firefoxos_parser.js b/src/metadata/firefoxos_parser.js
index 4bb1f22..ba26614 100644
--- a/src/metadata/firefoxos_parser.js
+++ b/src/metadata/firefoxos_parser.js
@@ -98,19 +98,7 @@ module.exports.prototype = {
             shell.cp('-rf', overrides, this.www_dir());
         }
     },
-    staging_dir: function() {
-        return path.join(this.path, '.staging', 'www');
-    },
-    update_staging: function() {
-        var projectRoot = util.isCordova(this.path);
-        var stagingDir = path.join(this.path, '.staging', 'www');
 
-        if(fs.existsSync(stagingDir)) {
-            shell.cp('-rf',
-                     path.join(stagingDir, '*'),
-                     this.www_dir());
-        }
-    },
     config_xml:function(){
         return path.join(this.path, 'config.xml');
     },
@@ -120,7 +108,6 @@ module.exports.prototype = {
         return this.update_from_config(cfg)
         .then(function(){
             this.update_overrides();
-            this.update_staging();
             util.deleteSvnFolders(this.www_dir());
         }.bind(this));
     }

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/src/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/ios_parser.js b/src/metadata/ios_parser.js
index 1548c69..0157a69 100644
--- a/src/metadata/ios_parser.js
+++ b/src/metadata/ios_parser.js
@@ -113,10 +113,6 @@ module.exports.prototype = {
         return path.join(this.path, 'www');
     },
 
-    staging_dir: function() {
-        return path.join(this.path, '.staging', 'www');
-    },
-
     config_xml:function(){
         return this.config_path;
     },
@@ -152,22 +148,12 @@ module.exports.prototype = {
         }
     },
 
-    // update the overrides folder into the www folder
-    update_staging:function() {
-        var projectRoot = util.isCordova(this.path);
-        if (fs.existsSync(this.staging_dir())) {
-            var staging = path.join(this.staging_dir(), '*');
-            shell.cp('-rf', staging, this.www_dir());
-        }
-    },
-
     // Returns a promise.
     update_project:function(cfg) {
         var self = this;
         return this.update_from_config(cfg)
         .then(function() {
             self.update_overrides();
-            self.update_staging();
             util.deleteSvnFolders(self.www_dir());
         });
     }

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/src/metadata/ubuntu_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/ubuntu_parser.js b/src/metadata/ubuntu_parser.js
index 0f0aa7c..3d1aed4 100644
--- a/src/metadata/ubuntu_parser.js
+++ b/src/metadata/ubuntu_parser.js
@@ -131,10 +131,6 @@ module.exports.prototype = {
         return path.join(this.path, 'www');
     },
 
-    staging_dir: function() {
-        return path.join(this.path, '.staging', 'www');
-    },
-
     update_www:function() {
         var projectRoot = util.isCordova(this.path);
         var www = util.projectWww(projectRoot);
@@ -152,17 +148,6 @@ module.exports.prototype = {
         }
     },
 
-    update_staging:function() {
-        var projectRoot = util.isCordova(this.path);
-        var stagingDir = path.join(this.path, '.staging', 'www');
-
-        if(fs.existsSync(stagingDir)) {
-            shell.cp('-rf',
-                     path.join(stagingDir, '*'),
-                     this.www_dir());
-        }
-    },
-
     // Returns a promise.
     update_project:function(cfg) {
         var self = this;
@@ -170,7 +155,6 @@ module.exports.prototype = {
         return this.update_from_config(cfg)
         .then(function() {
             self.update_overrides();
-            self.update_staging();
             util.deleteSvnFolders(self.www_dir());
         });
     }

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/src/metadata/windows8_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/windows8_parser.js b/src/metadata/windows8_parser.js
index f317e06..e9347e4 100644
--- a/src/metadata/windows8_parser.js
+++ b/src/metadata/windows8_parser.js
@@ -57,7 +57,7 @@ module.exports.check_requirements = function(project_root) {
     var command = '"' + path.join(lib_path, 'bin', 'check_reqs') + '"';
     events.emit('verbose', 'Running "' + command + '" (output to follow)');
     var d = Q.defer();
-    
+
     child_process.exec(command, function(err, output, stderr) {
         events.emit('verbose', output);
         if (err) {
@@ -256,21 +256,10 @@ module.exports.prototype = {
             else if(stat.isFile()) {
                 results.push(path.join(name, folder_dir[item]));
             }
-            // else { it is a FIFO, or a Socket, Symbolic Link or something ... } 
+            // else { it is a FIFO, or a Socket, Symbolic Link or something ... }
         }
         return results;
     },
-    staging_dir: function() {
-        return path.join(this.windows8_proj_dir, '.staging', 'www');
-    },
-
-    update_staging: function() {
-        var projectRoot = util.isCordova(this.windows8_proj_dir);
-        if (fs.existsSync(this.staging_dir())) {
-            var staging = path.join(this.staging_dir(), '*');
-            shell.cp('-rf', staging, this.www_dir());
-        }
-    },
 
     // calls the nessesary functions to update the windows8 project
     update_project:function(cfg) {
@@ -290,7 +279,6 @@ module.exports.prototype = {
         .then(function() {
             // overrides (merges) are handled in update_www()
             that.update_jsproj();
-            that.update_staging();
             //that.add_bom();
 
             util.deleteSvnFolders(that.www_dir());

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/src/metadata/wp7_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/wp7_parser.js b/src/metadata/wp7_parser.js
index fabe590..247ef59 100644
--- a/src/metadata/wp7_parser.js
+++ b/src/metadata/wp7_parser.js
@@ -222,7 +222,7 @@ module.exports.prototype = {
         var folder_dir = fs.readdirSync(dir);
         for(item in folder_dir) {
             var stat = fs.statSync(path.join(dir, folder_dir[item]));
- 
+
             if(stat.isDirectory()) {
                 var sub_dir = this.folder_contents(path.join(name, folder_dir[item]), path.join(dir,
folder_dir[item]));
                 //Add all subfolder item paths
@@ -233,21 +233,10 @@ module.exports.prototype = {
             else if(stat.isFile()) {
                 results.push(path.join(name, folder_dir[item]));
             }
-            // else { it is a FIFO, or a Socket or something ... } 
+            // else { it is a FIFO, or a Socket or something ... }
         }
         return results;
     },
-    staging_dir: function() {
-        return path.join(this.wp7_proj_dir, '.staging', 'www');
-    },
-
-    update_staging: function() {
-        var projectRoot = util.isCordova(this.wp7_proj_dir);
-        if (fs.existsSync(this.staging_dir())) {
-            var staging = path.join(this.staging_dir(), '*');
-            shell.cp('-rf', staging, this.www_dir());
-        }
-    },
 
     // calls the nessesary functions to update the wp7 project
     // Returns a promise.
@@ -266,7 +255,6 @@ module.exports.prototype = {
         .then(function() {
             that.update_csproj();
             // TODO: Add overrides support? Why is this missing?
-            that.update_staging();
             util.deleteSvnFolders(that.www_dir());
         });
     }

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/src/metadata/wp8_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/wp8_parser.js b/src/metadata/wp8_parser.js
index dd77b44..e64df3b 100644
--- a/src/metadata/wp8_parser.js
+++ b/src/metadata/wp8_parser.js
@@ -239,17 +239,6 @@ module.exports.prototype = {
         }
         return results;
     },
-    staging_dir: function() {
-        return path.join(this.wp8_proj_dir, '.staging', 'www');
-    },
-
-    update_staging: function() {
-        var projectRoot = util.isCordova(this.wp8_proj_dir);
-        if (fs.existsSync(this.staging_dir())) {
-            var staging = path.join(this.staging_dir(), '*');
-            shell.cp('-rf', staging, this.www_dir());
-        }
-    },
 
     // calls the nessesary functions to update the wp8 project
     // Returns a promise.
@@ -268,7 +257,6 @@ module.exports.prototype = {
         return hooks.fire('pre_package', { wwwPath:this.www_dir() })
         .then(function() {
             that.update_csproj();
-            that.update_staging();
             util.deleteSvnFolders(that.www_dir());
         });
     }

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index 080ec3a..ac1284a 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -306,12 +306,11 @@ function call_into_create(target, projectRoot, cfg, libDir, template_dir)
{
                 if (!plugins) return Q();
 
                 var plugman = require('plugman');
-                var staging_dir = parser.staging_dir();
                 // Install them serially.
                 return plugins.reduce(function(soFar, plugin) {
                     return soFar.then(function() {
                         events.emit('verbose', 'Installing plugin "' + plugin + '" following
successful platform add of ' + target);
-                        return plugman.raw.install(target, output, path.basename(plugin),
plugins_dir, { www_dir: staging_dir});
+                        return plugman.raw.install(target, output, path.basename(plugin),
plugins_dir);
                     });
                 }, Q());
             });

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b7097675/src/plugin.js
----------------------------------------------------------------------
diff --git a/src/plugin.js b/src/plugin.js
index 03d212e..5ee556a 100644
--- a/src/plugin.js
+++ b/src/plugin.js
@@ -109,7 +109,6 @@ module.exports = function plugin(command, targets, opts) {
                                 var platformRoot = path.join(projectRoot, 'platforms', platform),
                                     parser = new platforms[platform].parser(platformRoot),
                                     options = {
-                                        www_dir: parser.staging_dir(),
                                         cli_variables: {},
                                         searchpath: searchPath
                                     },
@@ -162,7 +161,7 @@ module.exports = function plugin(command, targets, opts) {
                             var platforms = require('../platforms');
                             var parser = new platforms[platform].parser(platformRoot);
                             events.emit('verbose', 'Calling plugman.uninstall on plugin "'
+ target + '" for platform "' + platform + '"');
-                            return plugman.raw.uninstall.uninstallPlatform(platform, platformRoot,
target, path.join(projectRoot, 'plugins'), { www_dir: parser.staging_dir() });
+                            return plugman.raw.uninstall.uninstallPlatform(platform, platformRoot,
target, path.join(projectRoot, 'plugins'));
                         });
                     }, Q())
                     .then(function() {


Mime
View raw message