Skip to content

Commit ab37d8b

Browse files
committed
Add defaults back to help
1 parent e27ea93 commit ab37d8b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

bin/react-docgen.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ function collect(val, memo) {
1616
return memo;
1717
}
1818

19+
var defaultExtensions = ['js', 'jsx'];
20+
var defaultExclude = [];
21+
var defaultIgnore = ['node_modules', '__tests__', '__mocks__'];
22+
1923
argv
2024
.usage('[path...] [options]')
2125
.description(
@@ -29,22 +33,23 @@ argv
2933
'pretty print JSON')
3034
.option(
3135
'-x, --extension <extension>',
32-
'File extensions to consider. Repeat to define multiple extensions. Default: js, jsx',
36+
'File extensions to consider. Repeat to define multiple extensions. Default: ' + JSON.stringify(defaultExtensions),
3337
collect,
3438
['js', 'jsx'])
3539
.option(
3640
'-e, --exclude <path>',
37-
'Filename pattern to exclude.',
41+
'Filename pattern to exclude. Default: ' + JSON.stringify(defaultExclude),
3842
collect,
3943
[])
4044
.option(
4145
'-i, --ignore <path>',
42-
'Folders to ignore',
46+
'Folders to ignore. Default: ' + JSON.stringify(defaultIgnore),
4347
collect,
4448
['node_modules', '__tests__', '__mocks__'])
4549
.option(
4650
'--resolver <resolver>',
47-
'Resolver name (findAllComponentDefinitions, findExportedComponentDefinition) or path to a module that exports a resolver.',
51+
'Resolver name (findAllComponentDefinitions, findExportedComponentDefinition) or path to a module that exports ' +
52+
'a resolver. Default: findExportedComponentDefinition',
4853
'findExportedComponentDefinition')
4954
.arguments('<path>');
5055

0 commit comments

Comments
 (0)