@samitouri / QOS-React / commits / 8148fe5ff4

Added DevTools CONTRIBUTING guide

Brian Vaughn committed Jul 8, 2021 at 14:11 UTC 8148fe5ff46ac738dec3cf4196dd82d2176c892f
1 file changed +65
packages/react-devtools/CONTRIBUTING.md new
+65
@@ -0,0 +1,65 @@
1 +Intrested in contributing to React DevTools, but not sure where to start? This is the place!
2 +
3 +# Install project dependencies
4 +To get started, check out the React repo:
5 +```sh
6 +git clone git@github.com:facebook/react.git
7 +```
8 +Next install dependencies:
9 +```sh
10 +cd <react-repo>
11 +
12 +yarn install
13 +
14 +cd scripts/release
15 +yarn install
16 +```
17 +
18 +# Build React and React DOM
19 +Next, check out (or build) the local version of React that DevTools uses:
20 +
21 +### Option 1 (fastest): Checkout DevTools dependencies
22 +```sh
23 +cd <react-repo>
24 +scripts/release/download-experimental-build.js --commit=main
25 +```
26 +
27 +### Option 2 (if you've ade local changes to react): Build from source
28 +```sh
29 +cd <react-repo>
30 +yarn build-for-devtools
31 +```
32 +
33 +# Testing your changes
34 +
35 +### Option 1 (fastest): Using the test shell
36 +Most changes can be tested using the DevTools test app. To run this, you'll need two terminals:
37 +
38 +First, run DevTools in DEV mode:
39 +```sh
40 +cd <react-repo>
41 +cd packages/react-devtools-inline
42 +yarn start
43 +```
44 +Next, run the test shell:
45 +```sh
46 +cd <react-repo>
47 +cd packages/react-devtools-shell
48 +yarn start
49 +```
50 +Now any changes you make to DevTools will automatically reload in the test app at http://localhost:8080
51 +
52 +### Option 2: Using the extension
53 +Some changes requiring testing in the browser extension (e.g. like "named hooks"). To do this, run the following script:
54 +```sh
55 +cd <react-repo>
56 +cd packages/react-devtools-extensions
57 +yarn build:chrome && yarn test:chrome
58 +```
59 +This will launch a standalone version of Chrome with the locally built React DevTools pre-installed. If you are testing a specific URL, you can make your testing even faster by passing the `--url` argument to the test script:
60 +```sh
61 +yarn build:chrome && yarn test:chrome --url=<url-to-test>
62 +```
63 +
64 +# Finding the right first issue
65 +The React team maintains [this list of "good first issues"](https://github.com/facebook/react/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22Component%3A+Developer+Tools%22+label%3A%22good+first+issue%22) for anyone interested in contributing to DevTools. If you see one that interests you, leave a comment!
\ No newline at end of file