cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject git commit: remove plugins.json on removal of a platform. fixed ref to parser in add-existing-plugins-to-new-platform-add.
Date Mon, 17 Jun 2013 23:33:28 GMT
Updated Branches:
  refs/heads/master2 da4340c4a -> 28c6fb48c


remove plugins.json on removal of a platform. fixed ref to parser in add-existing-plugins-to-new-platform-add.


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

Branch: refs/heads/master2
Commit: 28c6fb48cb3377ac10a005518fcbef3374f07dd8
Parents: da4340c
Author: Fil Maj <maj.fil@gmail.com>
Authored: Mon Jun 17 16:33:23 2013 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Mon Jun 17 16:33:23 2013 -0700

----------------------------------------------------------------------
 src/platform.js | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/28c6fb48/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index 0fac8d6..7694b13 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -148,6 +148,8 @@ module.exports = function platform(command, targets, callback) {
                     targets.forEach(function(target) {
                         shell.rm('-rf', path.join(projectRoot, 'platforms', target));
                         shell.rm('-rf', path.join(cordova_util.appDir(projectRoot), 'merges',
target));
+                        var plugins_json = path.join(projectRoot, 'plugins', target + '.json');
+                        if (fs.existsSync(plugins_json)) shell.rm(plugins_json);
                         end();
                     });
                 }
@@ -248,6 +250,7 @@ function call_into_create(target, projectRoot, cfg, id, version, callback,
end)
                                 // Install all currently installed plugins into this new
platform.
                                 var plugins_dir = path.join(projectRoot, 'plugins');
                                 var plugins = cordova_util.findPlugins(plugins_dir);
+                                var parser = new platforms[target].parser(output);
                                 plugins && plugins.forEach(function(plugin) {
                                     events.emit('log', 'Installing plugin "' + plugin + '"
following successful platform add of ' + target);
                                     plugman.install(target, output, path.basename(plugin),
plugins_dir, { www_dir: parser.staging_dir() });


Mime
View raw message