2019-08-13 22:15:38 -07:00
This is the source code for the React DevTools browser extension.
2019-05-08 12:53:22 -07:00
2019-08-27 15:20:34 -07:00
## Installation
2019-05-08 12:53:22 -07:00
2019-08-13 22:15:38 -07: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/ )
2021-10-08 04:22:08 +05:30
* [Edge Add-ons ](https://microsoftedge.microsoft.com/addons/detail/react-developer-tools/gpphkfbcpidddadnkolkpfckpihlkkil )
2019-05-08 12:53:22 -07:00
2019-12-18 14:34:40 -08:00
## Local development
2019-08-29 08:49:08 -07:00
You can also build and install this extension from source.
2019-12-18 14: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.
2022-10-05 17:27:09 +02:00
To install all necessary dependencies, run the following command from the root of the repository:
```sh
yarn install
```
2019-12-18 14:34:40 -08:00
#### Build from source
To build dependencies from source, run the following command from the root of the repository:
2019-08-13 22:15:38 -07:00
```sh
2019-12-18 14:34:40 -08:00
yarn build-for-devtools
2019-08-29 08:49:08 -07:00
```
2019-12-18 14:34:40 -08:00
#### Download from CI
2021-03-15 14:48:44 +01:00
To use the latest build from CI, run the following commands starting from the root of the repository:
2019-12-18 14:34:40 -08:00
```sh
2021-03-15 14:48:44 +01:00
cd scripts/release
yarn install
./download-experimental-build.js
2019-12-18 14:34:40 -08:00
```
### Build steps
Once the above packages have been built or downloaded, you can build the extension by running:
2019-08-29 08:49:08 -07:00
```sh
2019-08-27 15:20:34 -07: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
2021-10-08 04:22:08 +05:30
yarn build:edge # => packages/react-devtools-extensions/edge/build
yarn run test:edge # Test Edge extension
2019-02-16 09:46:10 -08:00
```