cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bra...@apache.org
Subject git commit: Call plugman.prepare on cordova prepare
Date Mon, 13 May 2013 19:53:17 GMT
Updated Branches:
  refs/heads/future 534448e27 -> 975ddb228


Call plugman.prepare on cordova prepare

This copies js-module files and creates cordova_plugins.json.


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

Branch: refs/heads/future
Commit: 975ddb228af811dd8bb37ed1dfd092a3d05295f9
Parents: 534448e
Author: Braden Shepherdson <braden.shepherdson@gmail.com>
Authored: Mon May 13 15:52:15 2013 -0400
Committer: Braden Shepherdson <braden.shepherdson@gmail.com>
Committed: Mon May 13 15:52:15 2013 -0400

----------------------------------------------------------------------
 src/prepare.js |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/975ddb22/src/prepare.js
----------------------------------------------------------------------
diff --git a/src/prepare.js b/src/prepare.js
index 06a6a18..570b29c 100644
--- a/src/prepare.js
+++ b/src/prepare.js
@@ -29,6 +29,7 @@ var cordova_util      = require('./util'),
     hooker            = require('./hooker'),
     n                 = require('ncallbacks'),
     prompt            = require('prompt'),
+    plugman           = require('plugman'),
     util              = require('util');
 
 var parsers = {
@@ -69,12 +70,16 @@ module.exports = function prepare(platforms, callback) {
         if (callback) callback();
     });
 
-    var cli = path.join(__dirname, '..', 'node_modules', 'plugman', 'main.js');
-
     // Iterate over each added platform
     platforms.forEach(function(platform) {
         var platformPath = path.join(projectRoot, 'platforms', platform);
         var parser = new parsers[platform](platformPath);
-        parser.update_project(cfg, end);
+
+        parser.update_project(cfg, function() {
+            // Call plugman --prepare for this platform.
+            plugman.prepare(platformPath, platform, path.join(projectRoot, 'plugins'));
+
+            end();
+        });
     });
 };


Mime
View raw message