Repository: cordova-cli Updated Branches: refs/heads/master 7b4508735 -> 472aaac56
CB-6756 Adds the platforms subcommand for save and restore github: close #178 Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/472aaac5 Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/472aaac5 Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/472aaac5 Branch: refs/heads/master Commit: 472aaac56950637e8234cfeeaf5cc7ba4bb75c5f Parents: 7b45087 Author: Gorkem Ercan <[email protected]> Authored: Wed May 21 11:13:37 2014 -0400 Committer: Andrew Grieve <[email protected]> Committed: Tue Jul 22 20:44:19 2014 -0400 ---------------------------------------------------------------------- doc/help.txt | 2 ++ src/cli.js | 10 +++------- 2 files changed, 5 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/472aaac5/doc/help.txt ---------------------------------------------------------------------- diff --git a/doc/help.txt b/doc/help.txt index 083fd20..c169b6c 100644 --- a/doc/help.txt +++ b/doc/help.txt @@ -58,9 +58,11 @@ Experimental Commands These commands require the --experimental flag. save plugins .............................. save the list of currently installed plugins to config.xml + platforms ............................ save the list of currently installed platforms to config.xml [--shrinkwrap] ....................... lock down plugin versions to currently installed versions restore plugins ........................... install all plugins that are currently listed in config.xml + platforms ......................... install all platforms that are currently listed in config.xml Command-line Flags/Options http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/472aaac5/src/cli.js ---------------------------------------------------------------------- diff --git a/src/cli.js b/src/cli.js index 23dbec3..7bf0ec0 100644 --- a/src/cli.js +++ b/src/cli.js @@ -244,14 +244,10 @@ function cli(inputArgs) { throw new CordovaError(msg); } subcommand = undashed[1]; - if (subcommand == 'plugins') { - cordova.raw[cmd].call(null, 'plugins', { shrinkwrap:args.shrinkwrap }); - } else { - msg = - 'Let cordova know what you want to '+ cmd + - ', try "cordova '+ cmd +' plugins"'; - throw new CordovaError(msg); + if (subcommand !== 'plugins' && subcommand !== 'platforms') { + throw new CordovaError('Specify what you want to '+ cmd + ', try "cordova '+ cmd +' plugins" or " cordova '+cmd+' platforms"'); } + cordova.raw[cmd].call(null, subcommand, { shrinkwrap:args.shrinkwrap }).done(); } else { // platform/plugins add/rm [target(s)] subcommand = undashed[1]; // sub-command like "add", "ls", "rm" etc.
