Skip to content

Commit 7ac60e7

Browse files
committed
Improvements of build scripts in package.json
1 parent 43525c2 commit 7ac60e7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,12 @@
122122
"url": "git+https://github.com/topcoder-platform/topcoder-react-utils.git"
123123
},
124124
"scripts": {
125-
"build": "npm run clean && npm run build:dev && npm run build:prod",
126-
"build:dev": "npm run mkDistDir:dev && ./node_modules/.bin/webpack --env=development --bail --colors --display-optimization-bailout --profile --progress && BABEL_ENV=development babel src/server --out-dir dist/dev/server && BABEL_ENV=development babel src/shared/utils/jest.jsx --out-file dist/dev/shared/utils/jest.js && BABEL_ENV=development babel src/client/init.js --out-file dist/dev/client/init.js",
127-
"build:dev:watch": "npm run clean && npm run mkDistDir:dev && (./node_modules/.bin/webpack --env=development --bail --colors --display-optimization-bailout --profile --progress --watch | BABEL_ENV=development babel src/server --out-dir dist/dev/server --watch | BABEL_ENV=development babel src/shared/utils/jest.jsx --out-file dist/dev/shared/utils/jest.js --watch | BABEL_ENV=development babel src/client/init.js --out-file dist/dev/client/init.js --watch)",
128-
"build:prod": "npm run mkDistDir:prod && BABEL_ENV=production ./node_modules/.bin/webpack --env=production --colors --display-optimization-bailout --profile --progress && BABEL_ENV=production babel src/server --out-dir dist/prod/server && BABEL_ENV=production babel src/shared/utils/jest.jsx --out-file dist/prod/shared/utils/jest.js && BABEL_ENV=production babel src/client/init.js --out-file dist/prod/client/init.js",
129-
"clean": "./node_modules/.bin/rimraf dist",
125+
"build": "npm run build:dev && npm run build:prod",
126+
"build:dev": "npm run clean:dev && npm run mkDistDir:dev && ./node_modules/.bin/webpack --env=development --bail --colors --display-optimization-bailout --profile --progress && BABEL_ENV=development babel src/server --out-dir dist/dev/server && BABEL_ENV=development babel src/shared/utils/jest.jsx --out-file dist/dev/shared/utils/jest.js && BABEL_ENV=development babel src/client/init.js --out-file dist/dev/client/init.js",
127+
"build:dev:watch": "npm run clean:dev && npm run mkDistDir:dev && (./node_modules/.bin/webpack --env=development --bail --colors --display-optimization-bailout --profile --progress --watch | BABEL_ENV=development babel src/server --out-dir dist/dev/server --watch | BABEL_ENV=development babel src/shared/utils/jest.jsx --out-file dist/dev/shared/utils/jest.js --watch | BABEL_ENV=development babel src/client/init.js --out-file dist/dev/client/init.js --watch)",
128+
"build:prod": "npm run clean:prod && npm run mkDistDir:prod && BABEL_ENV=production ./node_modules/.bin/webpack --env=production --colors --display-optimization-bailout --profile --progress && BABEL_ENV=production babel src/server --out-dir dist/prod/server && BABEL_ENV=production babel src/shared/utils/jest.jsx --out-file dist/prod/shared/utils/jest.js && BABEL_ENV=production babel src/client/init.js --out-file dist/prod/client/init.js",
129+
"clean:dev": "./node_modules/.bin/rimraf dist/dev",
130+
"clean:prod": "./node_modules/.bin/rimraf dist/prod",
130131
"jest": "NODE_CONFIG_ENV=test jest --no-cache --maxWorkers=4 --config config/jest/default.js",
131132
"lint": "npm run lint:js && npm run lint:scss",
132133
"lint:js": "eslint --ext .js,.jsx .",

0 commit comments

Comments
 (0)