Skip to content

Commit 46d418f

Browse files
committed
docs: Add cli option to README
1 parent 03895b8 commit 46d418f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Options:
4545
-i, --ignore Folders to ignore. Default: [node_modules,__tests__,__mocks__]
4646
--resolver RESOLVER Resolver name (findAllComponentDefinitions, findExportedComponentDefinition) or
4747
path to a module that exports a resolver. [findExportedComponentDefinition]
48+
--legacy-decorators Switch parsing to support only the legacy decorators syntax
4849
4950
Extract meta information from React components.
5051
If a directory is passed, it is recursively traversed.
@@ -83,7 +84,7 @@ As with the CLI, this will look for the exported component created through `Reac
8384
| source | string | The source text |
8485
| resolver | function | A function of the form `(ast: ASTNode, recast: Object) => (NodePath|Array<NodePath>)`. Given an AST and a reference to recast, it returns an (array of) NodePath which represents the component definition. |
8586
| handlers | Array\<function\> | An array of functions of the form `(documentation: Documentation, definition: NodePath) => void`. Each function is called with a `Documentation` object and a reference to the component definition as returned by `resolver`. Handlers extract relevant information from the definition and augment `documentation`. |
86-
| options | Pass options to react-docgen. Supported option is `legacyDecorators` which is a boolean |
87+
| options | Object | Pass options to react-docgen. Supported option is `legacyDecorators` which is a boolean |
8788

8889
#### resolver
8990

0 commit comments

Comments
 (0)