Skip to content

Commit 0836f62

Browse files
author
Brian Vaughn
authored
Updates the DevTools test script to make it easier to test other URLs. (facebook#19179)
1 parent 1cfd332 commit 0836f62

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ packages/react-devtools-extensions/firefox/build
3232
packages/react-devtools-extensions/firefox/*.xpi
3333
packages/react-devtools-extensions/firefox/*.pem
3434
packages/react-devtools-extensions/shared/build
35+
packages/react-devtools-extensions/.tempUserDataDir
3536
packages/react-devtools-inline/dist
3637
packages/react-devtools-shell/dist

packages/react-devtools-extensions/chrome/test.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@
44

55
const chromeLaunch = require('chrome-launch');
66
const {resolve} = require('path');
7+
const {argv} = require('yargs');
78

89
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/';
1011

1112
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+
],
1323
});

packages/react-devtools-extensions/edge/test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
const open = require('open');
66
const os = require('os');
77
const osName = require('os-name');
8-
const START_URL = 'https://facebook.github.io/react/';
98
const {resolve} = require('path');
9+
const {argv} = require('yargs');
1010

1111
const EXTENSION_PATH = resolve('./edge/build/unpacked');
12+
const START_URL = argv.url || 'https://reactjs.org/';
13+
1214
const extargs = `--load-extension=${EXTENSION_PATH}`;
1315

1416
const osname = osName(os.platform());

packages/react-devtools-extensions/firefox/test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
const {exec} = require('child-process-promise');
66
const {Finder} = require('firefox-profile');
77
const {resolve} = require('path');
8+
const {argv} = require('yargs');
89

910
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/';
1112

1213
const main = async () => {
1314
const finder = new Finder();

scripts/flow/config/flowconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[ignore]
22
.*/scripts/bench/.*
33
.*/build/.*
4+
.*/.tempUserDataDir/.*
45

56
# These shims are copied into external projects:
67
.*/rollup/shims/facebook-www/.*

0 commit comments

Comments
 (0)