Call prepare after each install and uninstall.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/4e794fb7 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/4e794fb7 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/4e794fb7 Branch: refs/heads/master Commit: 4e794fb7a6d20c1a9593cf54f6867ebe402e2d4c Parents: 0da1172 Author: Braden Shepherdson <[email protected]> Authored: Wed Apr 17 14:25:19 2013 -0400 Committer: Braden Shepherdson <[email protected]> Committed: Wed Apr 17 14:25:19 2013 -0400 ---------------------------------------------------------------------- plugman.js | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/4e794fb7/plugman.js ---------------------------------------------------------------------- diff --git a/plugman.js b/plugman.js index ebee8c3..85085b2 100755 --- a/plugman.js +++ b/plugman.js @@ -82,8 +82,7 @@ else if (cli_opts.list) { }); } else if (cli_opts.prepare && cli_opts.project) { - var www_dir = platform_modules[cli_opts.platform].www_dir(cli_opts.project); - plugin_loader.handlePrepare(cli_opts.project, plugins_dir, www_dir, cli_opts.platform); + handlePrepare(cli_opts.project, cli_opts.platform); } else if (cli_opts.remove) { removePlugin(cli_opts.plugin); @@ -148,10 +147,11 @@ function execAction(action, platform, project_dir, plugin_dir, cli_variables) { console.log(info.text); } } - + // run the platform-specific function try { platform_modules[platform].handlePlugin(action, project_dir, plugin_dir, plugin_et, filtered_variables); + handlePrepare(project_dir, platform); console.log('plugin ' + action + 'ed'); } catch(e) { var revert = (action == "install" ? "force-uninstall" : "force-install" ); @@ -238,3 +238,8 @@ function handlePlugin(action, platform, project_dir, name, cli_variables) { } } +function handlePrepare(project_dir, platform) { + var www_dir = platform_modules[platform].www_dir(project_dir); + plugin_loader.handlePrepare(project_dir, plugins_dir, www_dir, platform); +} +
