commander
Advanced tools
Comparing version 1.0.3 to 1.0.4
1.0.4 / 2012-09-03 | ||
================== | ||
* add `outputHelp()` method. | ||
1.0.3 / 2012-08-30 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -985,3 +985,15 @@ /*! | ||
/** | ||
* Output help information for this command | ||
* | ||
* @api public | ||
*/ | ||
Command.prototype.outputHelp = function(){ | ||
process.stdout.write(this.helpInformation()); | ||
this.emit('--help'); | ||
}; | ||
/** | ||
* Camel-case the given `flag` | ||
@@ -1038,4 +1050,3 @@ * | ||
if (options[i] == '--help' || options[i] == '-h') { | ||
process.stdout.write(cmd.helpInformation()); | ||
cmd.emit('--help'); | ||
cmd.outputHelp(); | ||
process.exit(0); | ||
@@ -1042,0 +1053,0 @@ } |
{ | ||
"name": "commander" | ||
, "version": "1.0.3" | ||
, "version": "1.0.4" | ||
, "description": "the complete solution for node.js command-line programs" | ||
@@ -5,0 +5,0 @@ , "keywords": ["command", "option", "parser", "prompt", "stdin"] |
33155
920