Comparing version 3.13.0 to 3.14.0
## Change Log | ||
### v3.14.0 (2015/06/28 02:12 +00:00) | ||
- [#192](https://github.com/bcoe/yargs/pull/192) standard style nits (@bcoe) | ||
- [#190](https://github.com/bcoe/yargs/pull/190) allow for hidden commands, e.g., | ||
.completion('completion', false) (@tschaub) | ||
### v3.13.0 (2015/06/24 04:12 +00:00) | ||
@@ -4,0 +10,0 @@ |
@@ -114,3 +114,5 @@ var assert = require('assert') | ||
self.command = function (cmd, description, fn) { | ||
usage.command(cmd, description) | ||
if (description !== false) { | ||
usage.command(cmd, description) | ||
} | ||
if (fn) commandHandlers[cmd] = fn | ||
@@ -367,3 +369,6 @@ return self | ||
completionCommand = cmd || 'completion' | ||
self.command(completionCommand, desc || 'generate bash completion script') | ||
if (!desc && desc !== false) { | ||
desc = 'generate bash completion script' | ||
} | ||
self.command(completionCommand, desc) | ||
@@ -370,0 +375,0 @@ // a function can be provided |
@@ -67,9 +67,9 @@ // fancy-pants parsing of argv, originally forked | ||
for (var i = 0; i < args.length; i++) { | ||
var arg = args[i], | ||
broken, | ||
key, | ||
letters, | ||
m, | ||
next, | ||
value | ||
var arg = args[i] | ||
var broken | ||
var key | ||
var letters | ||
var m | ||
var next | ||
var value | ||
@@ -76,0 +76,0 @@ // -- seperated by = |
{ | ||
"name": "yargs", | ||
"version": "3.13.0", | ||
"version": "3.14.0", | ||
"description": "Light-weight option parsing with an argv hash. No optstrings attached.", | ||
@@ -24,3 +24,3 @@ "main": "./index.js", | ||
"nyc": "^2.2.1", | ||
"standard": "^4.3.2" | ||
"standard": "^4.4.0" | ||
}, | ||
@@ -27,0 +27,0 @@ "scripts": { |
@@ -512,4 +512,6 @@ yargs | ||
use `desc` to provide a description for each command your application accepts (the | ||
values stored in `argv._`). | ||
Use `desc` to provide a description for each command your application accepts (the | ||
values stored in `argv._`). Set `desc` to `false` to create a hidden command. | ||
Hidden commands don't show up in the help output and aren't available for | ||
completion. | ||
@@ -516,0 +518,0 @@ Optionally, you can provide a handler `fn` which will be executed when |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105829
1325
934