Add package commands for creating dev builds for easier debugging
Brian Vaughn committed
Apr 13, 2019 at 18:25 UTC
7f6fdfea9560a781a19a2543e10b98e7de6943e6
3 files changed
+18
-10
package.json
+7
-3
@@ -30,9 +30,12 @@
30
]
31
},
32
"scripts": {
33
- "build:extension": "yarn run build:extension:chrome && yarn run build:extension:firefox",
34
- "build:extension:chrome": "node ./shells/browser/chrome/build",
35
- "build:extension:firefox": "node ./shells/browser/firefox/build",
33
+ "build:extension": "cross-env NODE_ENV=production yarn run build:extension:chrome && yarn run build:extension:firefox",
34
+ "build:extension:dev": "cross-env NODE_ENV=development yarn run build:extension:chrome && yarn run build:extension:firefox",
35
+ "build:extension:chrome": "cross-env NODE_ENV=production node ./shells/browser/chrome/build",
36
+ "build:extension:chrome:dev": "cross-env NODE_ENV=development node ./shells/browser/chrome/build",
37
+ "build:extension:firefox": "cross-env NODE_ENV=production node ./shells/browser/firefox/build",
38
+ "build:extension:firefox:dev": "cross-env NODE_ENV=development node ./shells/browser/firefox/build",
39
"build:standalone": "cd packages/react-devtools-core && yarn run build",
40
"deploy": "yarn run deploy:demo && yarn run deploy:chrome && yarn run deploy:firefox",
41
"deploy:demo": "cd shells/dev/ && now deploy && now alias react-devtools-experimental",
@@ -83,6 +86,7 @@
86
"classnames": "2.2.1",
87
"cli-spinners": "^1.0.0",
88
"clipboard-js": "^0.3.6",
89
+ "cross-env": "^5.2.0",
90
"crx": "git+https://github.com/oncletom/crx#ef150e8",
91
"css-loader": "^1.0.1",
92
"error-stack-parser": "^2.0.2",
shells/browser/shared/build.js
+2
-6
@@ -34,9 +34,7 @@ const build = async (tempPath, manifestPath, manifestVersion) => {
34
`${webpackPath} --config webpack.config.js --output-path ${binPath}`,
35
{
36
cwd: __dirname,
37
- env: Object.assign({}, process.env, {
38
- NODE_ENV: 'production',
39
- }),
37
+ env: process.env,
38
stdio: 'inherit',
39
}
40
);
@@ -44,9 +42,7 @@ const build = async (tempPath, manifestPath, manifestVersion) => {
42
`${webpackPath} --config webpack.backend.js --output-path ${binPath}`,
43
{
44
cwd: __dirname,
47
- env: Object.assign({}, process.env, {
48
- NODE_ENV: 'production',
49
- }),
45
+ env: process.env,
46
stdio: 'inherit',
47
}
48
);
yarn.lock
+9
-1
@@ -3470,6 +3470,14 @@ create-react-context@^0.2.1:
3470
fbjs "^0.8.0"
3471
gud "^1.0.0"
3472
3473
+cross-env@^5.2.0:
3474
+ version "5.2.0"
3475
+ resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2"
3476
+ integrity sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==
3477
+ dependencies:
3478
+ cross-spawn "^6.0.5"
3479
+ is-windows "^1.0.0"
3480
+
3481
cross-spawn-async@^2.2.2:
3482
version "2.2.5"
3483
resolved "https://registry.yarnpkg.com/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz#845ff0c0834a3ded9d160daca6d390906bb288cc"
@@ -6349,7 +6357,7 @@ is-utf8@^0.2.0, is-utf8@^0.2.1:
6357
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
6358
integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=
6359
6352
-is-windows@^1.0.1, is-windows@^1.0.2:
6360
+is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2:
6361
version "1.0.2"
6362
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
6363
integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==