Skip to content

Commit

Permalink
Add yarn steps for adding flow (facebook#1756)
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
zertosh authored and randycoulman committed May 8, 2017
1 parent bfd9cad commit 37cc59d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react-scripts/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -630,12 +630,12 @@ Recent versions of [Flow](http://flowtype.org/) work with Create React App proje

To add Flow to a Create React App project, follow these steps:

1. Run `npm install --save-dev flow-bin`.
1. Run `npm install --save-dev flow-bin` (or `yarn add --dev flow-bin`).
2. Add `"flow": "flow"` to the `scripts` section of your `package.json`.
3. Run `npm run flow -- init` to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory.
3. Run `npm run flow -- init` (or `yarn flow -- init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory.
4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`).

Now you can run `npm run flow` to check the files for type errors.
Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors.
You can optionally use an IDE like [Nuclide](https://nuclide.io/docs/languages/flow/) for a better integrated experience.
In the future we plan to integrate it into Create React App even more closely.

Expand Down

0 comments on commit 37cc59d

Please sign in to comment.