Permalink
Browse files

cloning options

  • Loading branch information...
1 parent 74f048a commit 48dfc405d50af4e78bb7fbe197bf44c72b51c935 @cadorn cadorn committed Oct 19, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 lib/commands/clone.js
View
@@ -10,25 +10,29 @@ var command = exports["clone"] = new ARGS_PARSER();
command.help("Clone a package/program from a URI.");
command.arg("URI");
command.arg("TARGET_PATH");
-command.option("--dev").bool().help("Same as --create --install");
-command.option("-c", "--create").bool().help("Create parent path `dirname(TARGET_PATH)` of `TARGET_PATH` if it does not exist.");
-command.option("-i", "--install").bool().help("Install after cloning.");
+command.option("--dev").bool().help("Clone and setup for development.");
+command.option("--cached").bool().help("Clone from local cache if available (will not aggressively fetch latest remote info).");
command.option("--delete").bool().help("Delete `TARGET_PATH` if it already exists.");
+command.option("-v", "--verbose").bool().help("Show verbose progress.");
command.helpful();
command.action(function (options) {
if (options.dev === true) {
+ options.forceClone = true;
options.create = true;
options.install = true;
}
// Update newInVersions but don't fetch latest remote info.
options.update = true;
+ options.now = true;
+ if (options.cached) {
+ options.now = false;
+ }
options.locator = options.args[0];
options.help = true;
- options.verbose = true;
PM.clone(PATH.resolve(options.args[1]), options).then(function() {
process.exit(0);

0 comments on commit 48dfc40

Please sign in to comment.