You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2016/03/19 01:56:52 UTC
[05/37] cordova-lib git commit: CB-10641 Run prepare _after_ plugins
were installed
CB-10641 Run prepare _after_ plugins were installed
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/3b9face5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/3b9face5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/3b9face5
Branch: refs/heads/common-1.1.x
Commit: 3b9face5187857d354d85f3e3f4316cbace100db
Parents: 5da4364
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Wed Feb 17 18:48:31 2016 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Thu Feb 18 12:36:21 2016 +0300
----------------------------------------------------------------------
cordova-lib/src/cordova/platform.js | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3b9face5/cordova-lib/src/cordova/platform.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/platform.js b/cordova-lib/src/cordova/platform.js
index 87f2e58..96c5f2f 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -180,18 +180,21 @@ function addHelper(cmd, hooksRunner, projectRoot, targets, opts) {
PlatformApi.createPlatform.bind(null, destination, cfg, options, events) :
PlatformApi.updatePlatform.bind(null, destination, options, events);
- return promise().then(function () {
+ return promise()
+ .then(function() {
+ if (cmd == 'add') {
+ return installPluginsForNewPlatform(platform, projectRoot, opts);
+ }
+ })
+ .then(function () {
// Call prepare for the current platform.
var prepOpts = {
platforms :[platform],
searchpath :opts.searchpath
};
return require('./cordova').raw.prepare(prepOpts);
- }).then(function() {
- if (cmd == 'add') {
- return installPluginsForNewPlatform(platform, projectRoot, opts);
- }
- }).then(function() {
+ })
+ .then(function() {
var saveVersion = !spec || semver.validRange(spec, true);
// Save platform@spec into platforms.json, where 'spec' is a version or a soure location. If a
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org