@samitouri / QOS-React-2 / commits / 0836f62a5b

Updates the DevTools test script to make it easier to test other URLs. (#19179)

Brian Vaughn committed Jun 23, 2020 at 11:48 UTC 0836f62a5bd305d8f901e3b4645613e990f09d6e
5 files changed +19 -4
.gitignore
+1
@@ -32,5 +32,6 @@ packages/react-devtools-extensions/firefox/build
32 packages/react-devtools-extensions/firefox/*.xpi
33 packages/react-devtools-extensions/firefox/*.pem
34 packages/react-devtools-extensions/shared/build
35 +packages/react-devtools-extensions/.tempUserDataDir
36 packages/react-devtools-inline/dist
37 packages/react-devtools-shell/dist
\ No newline at end of file
packages/react-devtools-extensions/chrome/test.js
+12 -2
@@ -4,10 +4,20 @@
4
5 const chromeLaunch = require('chrome-launch');
6 const {resolve} = require('path');
7 +const {argv} = require('yargs');
8
9 const EXTENSION_PATH = resolve('./chrome/build/unpacked');
9 -const START_URL = 'https://facebook.github.io/react/';
10 +const START_URL = argv.url || 'https://reactjs.org/';
11
12 chromeLaunch(START_URL, {
12 - args: [`--load-extension=${EXTENSION_PATH}`],
13 + args: [
14 + // Load the React DevTools extension
15 + `--load-extension=${EXTENSION_PATH}`,
16 +
17 + // Automatically open DevTools window
18 + '--auto-open-devtools-for-tabs',
19 +
20 + // Remembers previous session settings (e.g. DevTools size/position)
21 + '--user-data-dir=./.tempUserDataDir',
22 + ],
23 });
packages/react-devtools-extensions/edge/test.js
+3 -1
@@ -5,10 +5,12 @@
5 const open = require('open');
6 const os = require('os');
7 const osName = require('os-name');
8 -const START_URL = 'https://facebook.github.io/react/';
8 const {resolve} = require('path');
9 +const {argv} = require('yargs');
10
11 const EXTENSION_PATH = resolve('./edge/build/unpacked');
12 +const START_URL = argv.url || 'https://reactjs.org/';
13 +
14 const extargs = `--load-extension=${EXTENSION_PATH}`;
15
16 const osname = osName(os.platform());
packages/react-devtools-extensions/firefox/test.js
+2 -1
@@ -5,9 +5,10 @@
5 const {exec} = require('child-process-promise');
6 const {Finder} = require('firefox-profile');
7 const {resolve} = require('path');
8 +const {argv} = require('yargs');
9
10 const EXTENSION_PATH = resolve('./firefox/build/unpacked');
10 -const START_URL = 'https://facebook.github.io/react/';
11 +const START_URL = argv.url || 'https://reactjs.org/';
12
13 const main = async () => {
14 const finder = new Finder();
scripts/flow/config/flowconfig
+1
@@ -1,6 +1,7 @@
1 [ignore]
2 .*/scripts/bench/.*
3 .*/build/.*
4 +.*/.tempUserDataDir/.*
5
6 # These shims are copied into external projects:
7 .*/rollup/shims/facebook-www/.*