diff options
Diffstat (limited to 'cli.js')
-rwxr-xr-x | cli.js | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -25,7 +25,12 @@ var fs = require("./lib/utils/graceful-fs") log.verbose(argv, "cli") while (arg = argv.shift()) { - if (!key && (arg.match(/^-+[h?]$/i) || arg.match(/^-+help$/i))) arg = "--usage" + // FIXME: This is a mess right here. + // FIXME: Add a "config.flags" somewhere for configs that don't take values + // FIXME: Add config aliases for the shorthands and such. + if (!key && (arg.match(/^-+[h?]$/i) || arg.match(/^-+help$/i))) { + arg = "--usage" + } if (!key && arg.match(/^-d+$/i)) { // -d --loglevel info // -dd --loglevel verbose @@ -39,6 +44,13 @@ while (arg = argv.shift()) { default: arg = "silly" } } + if (!key && (arg.match(/^-+s$/) || arg.match(/^--silent$/))) { + key = "loglevel" + arg = "silent" + } else if (!key && arg.match(/^--verbose$/)) { + key = "loglevel" + arg = "verbose" + } if (!command && (npm.commands.hasOwnProperty(arg))) { if (key) { conf[key] = true |