Skip to content

Commit

Permalink
Add defaults back to help
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Dec 15, 2016
1 parent e27ea93 commit ab37d8b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions bin/react-docgen.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ function collect(val, memo) {
return memo;
}

var defaultExtensions = ['js', 'jsx'];
var defaultExclude = [];
var defaultIgnore = ['node_modules', '__tests__', '__mocks__'];

argv
.usage('[path...] [options]')
.description(
Expand All @@ -29,22 +33,23 @@ argv
'pretty print JSON')
.option(
'-x, --extension <extension>',
'File extensions to consider. Repeat to define multiple extensions. Default: js, jsx',
'File extensions to consider. Repeat to define multiple extensions. Default: ' + JSON.stringify(defaultExtensions),
collect,
['js', 'jsx'])
.option(
'-e, --exclude <path>',
'Filename pattern to exclude.',
'Filename pattern to exclude. Default: ' + JSON.stringify(defaultExclude),
collect,
[])
.option(
'-i, --ignore <path>',
'Folders to ignore',
'Folders to ignore. Default: ' + JSON.stringify(defaultIgnore),
collect,
['node_modules', '__tests__', '__mocks__'])
.option(
'--resolver <resolver>',
'Resolver name (findAllComponentDefinitions, findExportedComponentDefinition) or path to a module that exports a resolver.',
'Resolver name (findAllComponentDefinitions, findExportedComponentDefinition) or path to a module that exports ' +
'a resolver. Default: findExportedComponentDefinition',
'findExportedComponentDefinition')
.arguments('<path>');

Expand Down

0 comments on commit ab37d8b

Please sign in to comment.