v2.6.0
New: --resolver
CLI option
The --resolver
lets you specify from the CLI which resolver* to use. It can either be the name of a built-in resolver or a path to a JavaScript module that exports a resolver function:
react-docgen --resolver findExportedComponentDefinition ./path/to/component.js
# same as
react-docgen ./path/to/component.js
react-docgen --resolver findAllComponentDefinitions ./path/to/component.js
react-docgen --resolver ./path/to/custom/resolver.js ./path/to/component.js
* Resolvers contain the logic to find React component definitions in the JavaScript files.