Skip to content

Commit c94b768

Browse files
committed
Merge pull request #27 from chaseadamsio/fix/update-readme
Changes some spelling and markdown in README
2 parents 9229c1d + 58b6c8b commit c94b768

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ npm install -g react-docgen
1616

1717
## CLI
1818

19-
Installing the module adds a `react-docgen` executable which allows you do convert
19+
Installing the module adds a `react-docgen` executable which allows you to convert
2020
a single file, multiple files or an input stream. We are trying to make the
2121
executable as versatile as possible so that it can be integrated into many
2222
workflows.
@@ -63,8 +63,7 @@ As with the CLI, this will look for the exported component created through `Reac
6363
| -------------- | ------ | --------------- |
6464
| source | string | The source text |
6565
| 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. |
66-
| 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`.
67-
66+
| 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`. |
6867

6968
#### resolver
7069

@@ -96,8 +95,7 @@ For example, while the `propTypesHandler` expects the prop types definition to b
9695

9796
## Guidelines for default resolvers and handlers
9897

99-
- Modules have to export a single component, and only that component is
100-
analyzed.
98+
- Modules have to export a single component, and only that component is analyzed.
10199
- When using `React.createClass`, the component definition (the value passed to it) must resolve to an object literal.
102100
- When using classes, the class must either `extend React.Component` *or* define a `render()` method.
103101
- `propTypes` must be an object literal or resolve to an object literal in the same file.

0 commit comments

Comments
 (0)