Skip to content

Commit dc9b746

Browse files
aohuaAohua Mu
and
Aohua Mu
authored
[DevTools] Add fb local build command (facebook#32644)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary 1. Having a development build for FB will be convenient for fb internal feature development 2. Add a new checkbox to toggle new internal features added to React Devtools. ## How did you test this change? 1. yarn test 2. set extra env variables in bash profile and build an internal version with the new script. 3. toggle on/off the new checkbox, the value is stored in local storage correctly. --------- Co-authored-by: Aohua Mu <muaohua@fb.com>
1 parent b59f186 commit dc9b746

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/react-devtools-extensions/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"build:chrome": "cross-env NODE_ENV=production node ./chrome/build",
99
"build:chrome:fb": "cross-env NODE_ENV=production FEATURE_FLAG_TARGET=extension-fb node ./chrome/build --crx",
1010
"build:chrome:local": "cross-env NODE_ENV=development node ./chrome/build",
11+
"build:chrome:fb:local": "cross-env NODE_ENV=development FEATURE_FLAG_TARGET=extension-fb node ./chrome/build",
1112
"build:firefox": "cross-env NODE_ENV=production node ./firefox/build",
1213
"build:firefox:local": "cross-env NODE_ENV=development node ./firefox/build",
1314
"build:edge": "cross-env NODE_ENV=production node ./edge/build",

packages/react-devtools-shared/src/devtools/views/Settings/GeneralSettings.js

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {useContext, useMemo} from 'react';
1212
import {SettingsContext} from './SettingsContext';
1313
import {StoreContext} from '../context';
1414
import {CHANGE_LOG_URL} from 'react-devtools-shared/src/devtools/constants';
15+
import {isInternalFacebookBuild} from 'react-devtools-feature-flags';
1516

1617
import styles from './SettingsShared.css';
1718

@@ -46,6 +47,12 @@ export default function GeneralSettings(_: {}): React.Node {
4647

4748
return (
4849
<div className={styles.Settings}>
50+
{isInternalFacebookBuild && (
51+
<div className={styles.Setting}>
52+
This is an internal build of React DevTools for Meta
53+
</div>
54+
)}
55+
4956
<div className={styles.Setting}>
5057
<div className={styles.RadioLabel}>Theme</div>
5158
<select

0 commit comments

Comments
 (0)