Skip to content

v2.6.0

Compare
Choose a tag to compare
@fkling fkling released this 05 Jan 17:51
· 2203 commits to main since this release

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

Read more about resolvers.


* Resolvers contain the logic to find React component definitions in the JavaScript files.