Skip to content

Commit

Permalink
Use "npm-run-all" to run scripts
Browse files Browse the repository at this point in the history
[npm-run-all](https://github.com/mysticatea/npm-run-all) is a cross-browser approach to running npm tasks in series (`-s`) or parallel (`-p`). Rather than using a platform specific method to run scripts (e.g. `&&`), npm-run-all will work on all platforms and supports using Yarn if running with Yarn. I made a guess as to whether certain scripts should be run in series or parallel but feel free to change if my choices aren't optimal.
  • Loading branch information
danawoodman authored Jan 31, 2018
1 parent e9809fc commit d6ba54f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"jest": "^20.0.4",
"jest-cli": "^20.0.4",
"lerna": "^2.1.1",
"npm-run-all": "^4.1.2",
"plop": "^1.8.1",
"prettier": "^1.9.2",
"prettier-eslint-cli": "4.2.x",
Expand All @@ -41,15 +42,16 @@
},
"private": true,
"scripts": {
"bootstrap": "yarn && npm run check-versions && lerna run prepublish",
"bootstrap": "npm-run-all -s install check-versions prepublish",
"check-versions": "babel-node scripts/check-versions.js",
"format": "npm run format-packages && npm run format-cache-dir && npm run format-www && npm run format-examples && npm run format-scripts && npm run format-markdown",
"format": "npm-run-all -p format-packages format-cache-dir format-www format-examples format-scripts format-markdown",
"format-cache-dir": "prettier-eslint --write \"packages/gatsby/cache-dir/*.js\"",
"format-examples": "prettier-eslint --write \"examples/**/gatsby-node.js\" \"examples/**/gatsby-config.js\" \"examples/**/src/**/*.js\"",
"format-packages": "prettier-eslint --write \"packages/*/src/**/*.js\"",
"format-scripts": "prettier-eslint --write \"scripts/**/*.js\"",
"format-markdown": "prettier --write \"**/*.md\" --semi",
"format-www": "prettier-eslint --write \"www/*.js\" \"www/src/**/*.js\"",
"install": "yarn",
"jest": "jest",
"lerna": "lerna",
"lint": "eslint --ext .js,.jsx packages/**/src",
Expand All @@ -59,10 +61,10 @@
"publish-canary": "lerna publish --canary --yes",
"publish-next": "lerna publish --npm-tag=next",
"remotedev": "remotedev --hostname=localhost --port=19999",
"test": "yarn lint && yarn jest",
"test": "npm-run-all -s lint jest",
"test:update": "jest --updateSnapshot",
"test:watch": "jest --watch",
"test_bkup": "npm run lint && npm run test-node && npm run test-integration",
"test_bkup": "npm-run-all -s lint test-node test-integration",
"watch": "lerna run watch --no-sort --stream --concurrency 999"
},
"workspaces": [
Expand Down

0 comments on commit d6ba54f

Please sign in to comment.