Allow npm build
commands to be used cross-platform (on Windows).
Windows command prompts set and use enviroment variables differently than POSIX terminals. `cross-env` is a wrapper that allow the commands to run with the same effect on Windows as well. It will not affect any POSIX terminal (including Bash on Windows).
This commit is contained in:
parent
b294110db7
commit
0d7f653adf
@ -7,8 +7,8 @@
|
||||
"start": "webpack-dev-server -d --config webpack.dev.js",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"build": "NODE_ENV=production webpack --config webpack.prod.js --display-error-details",
|
||||
"build:scripts": "NODE_ENV=production webpack --config webpack.cli.js",
|
||||
"build": "cross-env NODE_ENV=production webpack --config webpack.prod.js --display-error-details",
|
||||
"build:scripts": "cross-env NODE_ENV=production webpack --config webpack.cli.js",
|
||||
"storybook": "start-storybook -p 9001",
|
||||
"storybook-build": "build-storybook -o dist",
|
||||
"lint": "npm run lint:js & npm run lint:css",
|
||||
@ -59,6 +59,7 @@
|
||||
"babel-preset-react": "^6.5.0",
|
||||
"babel-preset-stage-1": "^6.16.0",
|
||||
"babel-runtime": "^6.5.0",
|
||||
"cross-env": "^5.0.2",
|
||||
"css-loader": "^0.28.4",
|
||||
"enzyme": "^2.4.1",
|
||||
"eslint": "^3.7.1",
|
||||
|
17
yarn.lock
17
yarn.lock
@ -1807,6 +1807,13 @@ create-react-class@^15.5.1, create-react-class@^15.5.2, create-react-class@^15.5
|
||||
fbjs "^0.8.9"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
cross-env@^5.0.2:
|
||||
version "5.0.2"
|
||||
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.0.2.tgz#d39fd2fa28c1b5cfb91e7058d1efe8b4fcb01334"
|
||||
dependencies:
|
||||
cross-spawn "^5.1.0"
|
||||
is-windows "^1.0.0"
|
||||
|
||||
cross-spawn-async@^2.1.1:
|
||||
version "2.2.5"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz#845ff0c0834a3ded9d160daca6d390906bb288cc"
|
||||
@ -1821,7 +1828,7 @@ cross-spawn@^3.0.0:
|
||||
lru-cache "^4.0.1"
|
||||
which "^1.2.9"
|
||||
|
||||
cross-spawn@^5.0.1:
|
||||
cross-spawn@^5.0.1, cross-spawn@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
|
||||
dependencies:
|
||||
@ -3974,6 +3981,10 @@ is-windows@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c"
|
||||
|
||||
is-windows@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.1.tgz#310db70f742d259a16a369202b51af84233310d9"
|
||||
|
||||
is@^3.1.0:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/is/-/is-3.2.1.tgz#d0ac2ad55eb7b0bec926a5266f6c662aaa83dca5"
|
||||
@ -5747,10 +5758,6 @@ pluralize@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45"
|
||||
|
||||
pluralize@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-3.1.0.tgz#84213d0a12356069daa84060c559242633161368"
|
||||
|
||||
portfinder@^1.0.9:
|
||||
version "1.0.13"
|
||||
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9"
|
||||
|
Loading…
x
Reference in New Issue
Block a user