cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [04/22] git commit: testing out plugin loader approach by jesse
Date Thu, 11 Jul 2013 20:29:11 GMT
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/ee5cc777
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/ee5cc777
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/ee5cc777

Branch: refs/heads/plugman-registry
Commit: ee5cc7777ea99c2e28b4d7a10fbd7bb1263f9705
Parents: a9af62b
Author: Fil Maj <maj.fil@gmail.com>
Authored: Fri May 17 17:35:04 2013 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Wed Jun 19 13:16:47 2013 -0700

----------------------------------------------------------------------
 src/prepare.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/ee5cc777/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');
 
 };


Mime
View raw message