cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject git commit: CB-4910 Don't save id and name in config.json.
Date Fri, 10 Jan 2014 18:26:01 GMT
Updated Branches:
  refs/heads/master 562818554 -> 3d1824e46


CB-4910 Don't save id and name in config.json.

The values are never used, and can become out-of-date since the id &
name from config.xml are authorative.


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

Branch: refs/heads/master
Commit: 3d1824e465db79394c215168036bf6272e1978c8
Parents: 5628185
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Fri Jan 10 13:23:17 2014 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Fri Jan 10 13:25:31 2014 -0500

----------------------------------------------------------------------
 e2e/create.spec.js | 5 -----
 src/create.js      | 2 --
 src/platform.js    | 1 -
 src/prepare.js     | 1 -
 4 files changed, 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/3d1824e4/e2e/create.spec.js
----------------------------------------------------------------------
diff --git a/e2e/create.spec.js b/e2e/create.spec.js
index 6a47d12..baa0c22 100644
--- a/e2e/create.spec.js
+++ b/e2e/create.spec.js
@@ -96,11 +96,6 @@ describe('create end-to-end', function() {
         expect(path.join(project, 'www', 'config.xml')).toExist();
         expect(path.join(project, 'www', 'index.html')).toExist();
 
-        // Check contents of config.json
-        var cfg = config.read(project);
-        expect(cfg.id).toEqual(appId);
-        expect(cfg.name).toEqual(appName);
-
         // Check that www/config.xml was updated.
         var configXml = new util.config_parser(path.join(project, 'www', 'config.xml'));
         expect(configXml.packageName()).toEqual(appId);

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/3d1824e4/src/create.js
----------------------------------------------------------------------
diff --git a/src/create.js b/src/create.js
index 1502563..04d2dd8 100644
--- a/src/create.js
+++ b/src/create.js
@@ -51,8 +51,6 @@ module.exports = function create (dir, id, name, cfg) {
     cfg = cfg || {};
     id = id || cfg.id || DEFAULT_ID;
     name = name || cfg.name || DEFAULT_NAME;
-    cfg.id = id;
-    cfg.name = name;
 
     // Make absolute.
     dir = path.resolve(dir);

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/3d1824e4/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index af770dd..31d7d79 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -117,7 +117,6 @@ module.exports = function platform(command, targets) {
                 }
 
                 // First, lazy_load the latest version.
-                var config_json = config.read(projectRoot);
                 return hooks.fire('before_platform_update', opts)
                 .then(function() {
                     return lazy_load.based_on_config(projectRoot, plat);

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/3d1824e4/src/prepare.js
----------------------------------------------------------------------
diff --git a/src/prepare.js b/src/prepare.js
index 89daf5f..7ca3f2e 100644
--- a/src/prepare.js
+++ b/src/prepare.js
@@ -25,7 +25,6 @@ var cordova_util      = require('./util'),
     et                = require('elementtree'),
     hooker            = require('./hooker'),
     lazy_load         = require('./lazy_load'),
-    config            = require('./config'),
     events            = require('./events'),
     Q                 = require('q'),
     plugman           = require('plugman'),


Mime
View raw message