Command Line Interface (CLI) Reference
This is the complete reference of all available options for the CLI. A basic getting started guide can be found on this page.
Arguments
globs
TODO
Options
--failOnWarning
Default: false
Normally the CLI will not fail the process when warnings occur in react-docgen
and instead, print them to stderr
. When this option is specified the CLI will
exit with status code 2
on react-docgen warnings. This currently includes
the following warnings:
ERR_REACTDOCGEN_MISSING_DEFINITION
: No suitable component definition found.ERR_REACTDOCGEN_MULTIPLE_DEFINITIONS
: Multiple exported component definitions found. (This can only happen when using thefindExportedComponentDefinition
resolver)
Any other errors will always make the process exit with status code 1
,
independent of this option.
--handler <handlers>
Default: find the current default handlers on GitHub ↗ (opens in a new tab)
TODO
--help
Displays the help for the command with the current default values.
-i, --ignore <globs>
Default: ["**/node_modules/**", "**/__tests__/**", "**/__mocks__/**"]
TODO
--importer <importer>
TODO
--no-default-ignore
Default: false
Enabling this option will disable any of the default ignores specified in the
ignore
option.
-o, --out <file>
Store extracted information in the specified file instead of printing to
stdout
. If the file exists it will be overwritten.
Examples
TODO
--pretty
Default: false
This option will make the CLI print the output JSON with proper spacing and newlines.
--resolver <resolvers>
Default: ["find-exported-component"]
TODO