Skip to content

Commit 0ee830a

Browse files
authored
Merge pull request reactjs#269 from monkindey/yarn_link
correct `yarn link` usage
2 parents 5d0ca11 + 7d2a65c commit 0ee830a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

content/docs/how-to-contribute.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,15 @@ First, run `yarn build`. This will produce pre-built bundles in `build` folder,
119119

120120
The easiest way to try your changes is to run `yarn build core,dom --type=UMD` and then open `fixtures/packaging/babel-standalone/dev.html`. This file already uses `react.development.js` from the `build` folder so it will pick up your changes.
121121

122-
If you want to try your changes in your existing React project, you may copy `build/dist/react.development.js`, `build/dist/react-dom.development.js`, or any other build products into your app and use them instead of the stable version. If your project uses React from npm, you may delete `react` and `react-dom` in its dependencies and use `npm link` to point them to your local `build` folder:
122+
If you want to try your changes in your existing React project, you may copy `build/dist/react.development.js`, `build/dist/react-dom.development.js`, or any other build products into your app and use them instead of the stable version. If your project uses React from npm, you may delete `react` and `react-dom` in its dependencies and use `yarn link` to point them to your local `build` folder:
123123

124124
```sh
125-
cd your_project
126-
yarn link ~/path_to_your_react_clone/build/packages/react
127-
yarn link ~/path_to_your_react_clone/build/packages/react-dom
125+
cd ~/path_to_your_react_clone/build/packages/react
126+
yarn link
127+
cd ~/path_to_your_react_clone/build/packages/react-dom
128+
yarn link
129+
cd /path/to/your/project
130+
yarn link react react-dom
128131
```
129132

130133
Every time you run `yarn build` in the React folder, the updated versions will appear in your project's `node_modules`. You can then rebuild your project to try your changes.

0 commit comments

Comments
 (0)