You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/05/18 02:35:10 UTC
git commit: testing out plugin loader approach by jesse
Updated Branches:
refs/heads/pl [created] 16f2cf942
testing out plugin loader approach by jesse
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/16f2cf94
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/16f2cf94
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/16f2cf94
Branch: refs/heads/pl
Commit: 16f2cf9425f79ff592206aef36aef27bb6b07b11
Parents: 7b63c0b
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 17:35:04 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 17:35:04 2013 -0700
----------------------------------------------------------------------
src/prepare.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/16f2cf94/src/prepare.js
----------------------------------------------------------------------
diff --git a/src/prepare.js b/src/prepare.js
index 7f3df91..800c8e1 100644
--- a/src/prepare.js
+++ b/src/prepare.js
@@ -120,6 +120,9 @@ module.exports = function handlePrepare(project_dir, platform, plugins_dir) {
});
// Write out moduleObjects as JSON to cordova_plugins.json
- fs.writeFileSync(path.join(wwwDir, 'cordova_plugins.json'), JSON.stringify(moduleObjects), 'utf-8');
+ var final_contents = "cordova.define('cordova/plugin_list', function(require, exports, module) {\n";
+ final_contents += 'module.exports = ' + JSON.stringify(moduleObjects) + '\n';
+ final_contents += '});';
+ fs.writeFileSync(path.join(wwwDir, 'cordova_plugins.js'), final_contents, 'utf-8');
};