Use npm-run-all to execute npm scripts

This commit is contained in:
Yuya Ochiai 2016-12-22 00:07:24 +09:00
parent 3d56c12380
commit 77e9ba0a32

View file

@ -19,15 +19,16 @@
"scripts": { "scripts": {
"install": "cd src && npm install", "install": "cd src && npm install",
"postinstall": "npm run build", "postinstall": "npm run build",
"build": "npm run build:main && npm run build:renderer && gulp build", "build": "npm-run-all build:*",
"build:main": "cross-env NODE_ENV=production webpack --config webpack.config.main.js", "build:main": "cross-env NODE_ENV=production webpack --config webpack.config.main.js",
"build:renderer": "cross-env NODE_ENV=production webpack --config webpack.config.renderer.js", "build:renderer": "cross-env NODE_ENV=production webpack --config webpack.config.renderer.js",
"build:others": "gulp build",
"start": "electron dist", "start": "electron dist",
"watch": "gulp watch", "watch": "gulp watch",
"serve": "gulp watch", "serve": "gulp watch",
"test": "npm run build && npm run test:app && npm run lint:js", "test": "npm-run-all build test:* lint:*",
"test:app": "mocha --reporter mocha-circleci-reporter --recursive test/specs", "test:app": "mocha --reporter mocha-circleci-reporter --recursive test/specs",
"package:all": "npm run package:windows && npm run package:mac && npm run package:linux", "package:all": "npm-run-all package:windows package:mac package:linux",
"package:windows": "build --win --x64 --ia32 --em.name=mattermost && npm run manipulate-windows-zip", "package:windows": "build --win --x64 --ia32 --em.name=mattermost && npm run manipulate-windows-zip",
"package:mac": "build --mac --x64 --ia32", "package:mac": "build --mac --x64 --ia32",
"package:linux": "build --linux --x64 --ia32 --em.name=mattermost-desktop", "package:linux": "build --linux --x64 --ia32 --em.name=mattermost-desktop",
@ -56,6 +57,7 @@
"json-loader": "^0.5.4", "json-loader": "^0.5.4",
"mocha": "^3.0.2", "mocha": "^3.0.2",
"mocha-circleci-reporter": "0.0.2", "mocha-circleci-reporter": "0.0.2",
"npm-run-all": "^3.1.2",
"spectron": "~3.4.0", "spectron": "~3.4.0",
"webpack": "^1.13.1", "webpack": "^1.13.1",
"webpack-merge": "^0.14.1" "webpack-merge": "^0.14.1"