Skip to content

Commit 37cc59d

Browse files
zertoshrandycoulman
authored andcommitted
Add yarn steps for adding flow (facebook#1756)
[skip ci]
1 parent bfd9cad commit 37cc59d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/react-scripts/template/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -630,12 +630,12 @@ Recent versions of [Flow](http://flowtype.org/) work with Create React App proje
630630

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

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

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

0 commit comments

Comments
 (0)