My package.json looks like the following:
{
\"name\": \"project\",
\"version\": \"1.0.0\",
\"description\": \"\",
\"main\": \"server.js\",
\"scripts\":
You can chain independent tasks.
Here is an example:
"scripts": {
"lint-jshint": "jshint --verbose --show-non-errors ./src/main/js",
"lint-eslint": "eslint ./src/main/js ./src/test/js",
"lint-csslint": "csslint ./src/main/js",
"lint": "npm run -s lint-jshint & npm run -s lint-eslint & npm run -s lint-csslint",
"pretest": "rimraf ./build/reports/tests && mkdirp ./build/reports/tests && npm run -s lint",
"test": "karma start ./src/test/resources/conf/karma.conf.js",
...
Here is a nice blog which I used at that time: https://www.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/