You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2013/07/15 00:08:55 UTC
[2/7] git commit: [CB-4141] removed cordova_plugins.json writing and
related spec. Added mee-self to the contributors. cordova_plugns.js is pretty
printed.
[CB-4141] removed cordova_plugins.json writing and related spec. Added mee-self to the contributors. cordova_plugns.js is pretty printed.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/f1fc2b91
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/f1fc2b91
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/f1fc2b91
Branch: refs/heads/plugman-registry
Commit: f1fc2b911056a7db1c9bd52ccd1e3d4e631bf23f
Parents: 799169e
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Jul 11 18:53:51 2013 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu Jul 11 18:53:51 2013 -0700
----------------------------------------------------------------------
package.json | 3 +++
spec/prepare.spec.js | 4 ----
src/prepare.js | 7 +------
3 files changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/f1fc2b91/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index f365efd..50f99ee 100644
--- a/package.json
+++ b/package.json
@@ -67,6 +67,9 @@
},
{
"name":"Michael Brooks"
+ },
+ {
+ "name":"Jesse MacFadyen"
}
]
}
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/f1fc2b91/spec/prepare.spec.js
----------------------------------------------------------------------
diff --git a/spec/prepare.spec.js b/spec/prepare.spec.js
index 791023d..b255a3b 100644
--- a/spec/prepare.spec.js
+++ b/spec/prepare.spec.js
@@ -37,10 +37,6 @@ describe('prepare', function() {
find:find
});
});
- it('should create a cordova_plugins.json file', function() {
- prepare(temp, 'android', plugins_dir);
- expect(write).toHaveBeenCalledWith(json, jasmine.any(String), 'utf-8');
- });
it('should create a cordova_plugins.js file', function() {
prepare(temp, 'android', plugins_dir);
expect(write).toHaveBeenCalledWith(js, jasmine.any(String), 'utf-8');
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/f1fc2b91/src/prepare.js
----------------------------------------------------------------------
diff --git a/src/prepare.js b/src/prepare.js
index 3e95437..a694d75 100644
--- a/src/prepare.js
+++ b/src/prepare.js
@@ -139,14 +139,9 @@ module.exports = function handlePrepare(project_dir, platform, plugins_dir) {
}
});
- require('../plugman').emit('log', 'Writing out cordova_plugins.json...');
- // Write out moduleObjects as JSON to cordova_plugins.json
- fs.writeFileSync(path.join(wwwDir, 'cordova_plugins.json'), JSON.stringify(moduleObjects), 'utf-8');
// Write out moduleObjects as JSON wrapped in a cordova module to cordova_plugins.js
- // This is to support Windows Phone platforms that have trouble with XHR during load
var final_contents = "cordova.define('cordova/plugin_list', function(require, exports, module) {\n";
- final_contents += 'module.exports = ' + JSON.stringify(moduleObjects) + '\n';
- final_contents += '});';
+ final_contents += 'module.exports = ' + JSON.stringify(moduleObjects,null,' ') + '\n});';
require('../plugman').emit('log', 'Writing out cordova_plugins.js...');
fs.writeFileSync(path.join(wwwDir, 'cordova_plugins.js'), final_contents, 'utf-8');
};