Add package commands for creating dev builds for easier debugging

This commit is contained in:
Brian Vaughn 2019-04-13 18:25:56 -07:00
parent 00f6466ec1
commit 7f6fdfea95
3 changed files with 18 additions and 10 deletions

View File

@ -30,9 +30,12 @@
]
},
"scripts": {
"build:extension": "yarn run build:extension:chrome && yarn run build:extension:firefox",
"build:extension:chrome": "node ./shells/browser/chrome/build",
"build:extension:firefox": "node ./shells/browser/firefox/build",
"build:extension": "cross-env NODE_ENV=production yarn run build:extension:chrome && yarn run build:extension:firefox",
"build:extension:dev": "cross-env NODE_ENV=development yarn run build:extension:chrome && yarn run build:extension:firefox",
"build:extension:chrome": "cross-env NODE_ENV=production node ./shells/browser/chrome/build",
"build:extension:chrome:dev": "cross-env NODE_ENV=development node ./shells/browser/chrome/build",
"build:extension:firefox": "cross-env NODE_ENV=production node ./shells/browser/firefox/build",
"build:extension:firefox:dev": "cross-env NODE_ENV=development node ./shells/browser/firefox/build",
"build:standalone": "cd packages/react-devtools-core && yarn run build",
"deploy": "yarn run deploy:demo && yarn run deploy:chrome && yarn run deploy:firefox",
"deploy:demo": "cd shells/dev/ && now deploy && now alias react-devtools-experimental",
@ -83,6 +86,7 @@
"classnames": "2.2.1",
"cli-spinners": "^1.0.0",
"clipboard-js": "^0.3.6",
"cross-env": "^5.2.0",
"crx": "git+https://github.com/oncletom/crx#ef150e8",
"css-loader": "^1.0.1",
"error-stack-parser": "^2.0.2",

View File

@ -34,9 +34,7 @@ const build = async (tempPath, manifestPath, manifestVersion) => {
`${webpackPath} --config webpack.config.js --output-path ${binPath}`,
{
cwd: __dirname,
env: Object.assign({}, process.env, {
NODE_ENV: 'production',
}),
env: process.env,
stdio: 'inherit',
}
);
@ -44,9 +42,7 @@ const build = async (tempPath, manifestPath, manifestVersion) => {
`${webpackPath} --config webpack.backend.js --output-path ${binPath}`,
{
cwd: __dirname,
env: Object.assign({}, process.env, {
NODE_ENV: 'production',
}),
env: process.env,
stdio: 'inherit',
}
);

View File

@ -3470,6 +3470,14 @@ create-react-context@^0.2.1:
fbjs "^0.8.0"
gud "^1.0.0"
cross-env@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2"
integrity sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==
dependencies:
cross-spawn "^6.0.5"
is-windows "^1.0.0"
cross-spawn-async@^2.2.2:
version "2.2.5"
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:
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=
is-windows@^1.0.1, is-windows@^1.0.2:
is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==