Skip to content

Commit

Permalink
Updates the DevTools test script to make it easier to test other URLs. (
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn authored Jun 23, 2020
1 parent 1cfd332 commit 0836f62
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ packages/react-devtools-extensions/firefox/build
packages/react-devtools-extensions/firefox/*.xpi
packages/react-devtools-extensions/firefox/*.pem
packages/react-devtools-extensions/shared/build
packages/react-devtools-extensions/.tempUserDataDir
packages/react-devtools-inline/dist
packages/react-devtools-shell/dist
14 changes: 12 additions & 2 deletions packages/react-devtools-extensions/chrome/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@

const chromeLaunch = require('chrome-launch');
const {resolve} = require('path');
const {argv} = require('yargs');

const EXTENSION_PATH = resolve('./chrome/build/unpacked');
const START_URL = 'https://facebook.github.io/react/';
const START_URL = argv.url || 'https://reactjs.org/';

chromeLaunch(START_URL, {
args: [`--load-extension=${EXTENSION_PATH}`],
args: [
// Load the React DevTools extension
`--load-extension=${EXTENSION_PATH}`,

// Automatically open DevTools window
'--auto-open-devtools-for-tabs',

// Remembers previous session settings (e.g. DevTools size/position)
'--user-data-dir=./.tempUserDataDir',
],
});
4 changes: 3 additions & 1 deletion packages/react-devtools-extensions/edge/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
const open = require('open');
const os = require('os');
const osName = require('os-name');
const START_URL = 'https://facebook.github.io/react/';
const {resolve} = require('path');
const {argv} = require('yargs');

const EXTENSION_PATH = resolve('./edge/build/unpacked');
const START_URL = argv.url || 'https://reactjs.org/';

const extargs = `--load-extension=${EXTENSION_PATH}`;

const osname = osName(os.platform());
Expand Down
3 changes: 2 additions & 1 deletion packages/react-devtools-extensions/firefox/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
const {exec} = require('child-process-promise');
const {Finder} = require('firefox-profile');
const {resolve} = require('path');
const {argv} = require('yargs');

const EXTENSION_PATH = resolve('./firefox/build/unpacked');
const START_URL = 'https://facebook.github.io/react/';
const START_URL = argv.url || 'https://reactjs.org/';

const main = async () => {
const finder = new Finder();
Expand Down
1 change: 1 addition & 0 deletions scripts/flow/config/flowconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[ignore]
.*/scripts/bench/.*
.*/build/.*
.*/.tempUserDataDir/.*

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

0 comments on commit 0836f62

Please sign in to comment.