commander 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/History.md +6 -0
- package/Readme.md +2 -3
- package/lib/commander.js +3 -2
- package/package.json +2 -2
package/History.md
CHANGED
package/Readme.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
# Commander.js
|
|
3
2
|
|
|
4
3
|
The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).
|
|
@@ -50,7 +49,7 @@ console.log(' - %s cheese', program.cheese);
|
|
|
50
49
|
|
|
51
50
|
Options:
|
|
52
51
|
|
|
53
|
-
-
|
|
52
|
+
-V, --version output the version number
|
|
54
53
|
-p, --peppers Add peppers
|
|
55
54
|
-P, --pineapple Add pineappe
|
|
56
55
|
-b, --bbq Add bbq sauce
|
|
@@ -142,7 +141,7 @@ Usage: custom-help [options]
|
|
|
142
141
|
Options:
|
|
143
142
|
|
|
144
143
|
-h, --help output usage information
|
|
145
|
-
-
|
|
144
|
+
-V, --version output the version number
|
|
146
145
|
-f, --foo enable some foo
|
|
147
146
|
-b, --bar enable some bar
|
|
148
147
|
-B, --baz enable some baz
|
package/lib/commander.js
CHANGED
|
@@ -903,11 +903,12 @@ Command.prototype.password = function(str, mask, fn){
|
|
|
903
903
|
*/
|
|
904
904
|
|
|
905
905
|
|
|
906
|
-
Command.prototype.confirm = function(str, fn){
|
|
906
|
+
Command.prototype.confirm = function(str, fn, verbose){
|
|
907
907
|
var self = this;
|
|
908
908
|
this.prompt(str, function(ok){
|
|
909
909
|
if (!ok.trim()) {
|
|
910
|
-
|
|
910
|
+
if (!verbose) str += '(yes or no) ';
|
|
911
|
+
return self.confirm(str, fn, true);
|
|
911
912
|
}
|
|
912
913
|
fn(parseBool(ok));
|
|
913
914
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commander"
|
|
3
|
-
, "version": "0.6.
|
|
3
|
+
, "version": "0.6.1"
|
|
4
4
|
, "description": "the complete solution for node.js command-line programs"
|
|
5
5
|
, "keywords": ["command", "option", "parser", "prompt", "stdin"]
|
|
6
6
|
, "author": "TJ Holowaychuk <tj@vision-media.ca>"
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
, "devDependencies": { "should": ">= 0.0.1" }
|
|
10
10
|
, "scripts": { "test": "make test" }
|
|
11
11
|
, "main": "index"
|
|
12
|
-
, "engines": { "node": ">= 0.4.x
|
|
12
|
+
, "engines": { "node": ">= 0.4.x" }
|
|
13
13
|
}
|