2019-08-14 13:15:38 +08:00
This is the source code for the React DevTools browser extension.
2019-05-09 03:53:22 +08:00
2019-08-28 06:20:34 +08:00
## Installation
2019-05-09 03:53:22 +08:00
2019-08-14 13:15:38 +08:00
The easiest way to install this extension is as a browser add-on:
* [Chrome web store ](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en )
* [Firefox Add-ons ](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/ )
2019-05-09 03:53:22 +08:00
2019-12-19 06:34:40 +08:00
## Local development
2019-08-29 23:49:08 +08:00
You can also build and install this extension from source.
2019-12-19 06:34:40 +08:00
### Prerequisite steps
DevTools depends on local versions of several NPM packages< sup > 1< / sup > also in this workspace. You'll need to either build or download those packages first.
< sup > 1</ sup > Note that at this time, an _experimental_ build is required because DevTools depends on the `createRoot` API.
#### Build from source
To build dependencies from source, run the following command from the root of the repository:
2019-08-14 13:15:38 +08:00
```sh
2019-12-19 06:34:40 +08:00
yarn build-for-devtools
2019-08-29 23:49:08 +08:00
```
2019-12-19 06:34:40 +08:00
#### Download from CI
To use the latest build from CI, run the following command from the root of the repository:
```sh
./scripts/release/download-experimental-build.js
```
### Build steps
Once the above packages have been built or downloaded, you can build the extension by running:
2019-08-29 23:49:08 +08:00
```sh
2019-08-28 06:20:34 +08:00
cd packages/react-devtools-extensions/
yarn build:chrome # => packages/react-devtools-extensions/chrome/build
yarn run test:chrome # Test Chrome extension
yarn build:firefox # => packages/react-devtools-extensions/firefox/build
yarn run test:firefox # Test Firefox extension
2019-02-17 01:46:10 +08:00
```