Skip to content

Commit

Permalink
chore: updated yargs Fixed #836
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-redFox committed Sep 29, 2017
1 parent 10bbba5 commit 227db1c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
6 changes: 3 additions & 3 deletions bin/documentation.js
Expand Up @@ -6,6 +6,7 @@ var yargs = require('yargs');
var commands = require('../lib/commands');

var argv = yargs
.strict()
.command(commands.serve)
.command(commands.build)
.command(commands.lint)
Expand All @@ -19,9 +20,8 @@ var argv = yargs
return yargs.exit(1);
}
})
.version(function() {
return require('../package').version;
})
.example('documentation build foo.js -f md > API.md')
.version()
.usage(
`Usage:
Expand Down
5 changes: 2 additions & 3 deletions package.json
Expand Up @@ -54,7 +54,7 @@
"vfile-sort": "^2.0.0",
"vinyl": "^2.0.0",
"vinyl-fs": "^2.3.1",
"yargs": "^6.0.1"
"yargs": "^9.0.1"
},
"devDependencies": {
"are-we-flow-yet": "^1.0.0",
Expand Down Expand Up @@ -137,8 +137,7 @@
},
"greenkeeper": {
"ignore": [
"remote-origin-url",
"yargs"
"remote-origin-url"
]
}
}
4 changes: 2 additions & 2 deletions src/commands/build.js
Expand Up @@ -23,9 +23,9 @@ module.exports.builder = _.assign(
sharedOptions.sharedOutputOptions,
sharedOptions.sharedInputOptions,
{
example: 'documentation build foo.js -f md > API.md',
output: {
describe: 'output location. omit for stdout, otherwise is a filename ' +
describe:
'output location. omit for stdout, otherwise is a filename ' +
'for single-file outputs and a directory name for multi-file outputs like html',
default: 'stdout',
alias: 'o'
Expand Down
15 changes: 7 additions & 8 deletions src/commands/shared_options.js
Expand Up @@ -4,11 +4,10 @@
* Adds shared options to any command that runs documentation
*/
module.exports.sharedInputOptions = {
strict: true,
shallow: {
describe:
'shallow mode turns off dependency resolution, ' +
'only processing the specified files (or the main script specified in package.json)',
'only processing the specified files (or the main script specified in package.json)',
default: false,
type: 'boolean'
},
Expand All @@ -27,13 +26,13 @@ module.exports.sharedInputOptions = {
external: {
describe:
'a string / glob match pattern that defines which external ' +
'modules will be whitelisted and included in the generated documentation.',
'modules will be whitelisted and included in the generated documentation.',
default: null
},
'require-extension': {
describe:
"additional extensions to include in require() and import's search algorithm." +
'For instance, adding .es5 would allow require("adder") to find "adder.es5"',
'For instance, adding .es5 would allow require("adder") to find "adder.es5"',
// Ensure that the value is an array
coerce: (value: string | Array<string>) => [].concat(value),
alias: 're'
Expand All @@ -53,8 +52,8 @@ module.exports.sharedInputOptions = {
access: {
describe:
'Include only comments with a given access level, out of private, ' +
'protected, public, undefined. By default, public, protected, and undefined access ' +
'levels are included',
'protected, public, undefined. By default, public, protected, and undefined access ' +
'levels are included',
choices: ['public', 'private', 'protected', 'undefined'],
array: true,
alias: 'a'
Expand All @@ -68,13 +67,13 @@ module.exports.sharedInputOptions = {
type: 'string',
describe:
'Infer private access based on the name. This is a regular expression that ' +
'is used to match the name'
'is used to match the name'
},
'document-exported': {
type: 'boolean',
describe:
'Generate documentation for all exported bindings and members ' +
'even if there is no JSDoc for them',
'even if there is no JSDoc for them',
default: false
},
'sort-order': {
Expand Down

0 comments on commit 227db1c

Please sign in to comment.