Skip to content

Instantly share code, notes, and snippets.

@pomber
Created March 14, 2017 22:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pomber/83b9c1cf73981ac56a14beaa5911a271 to your computer and use it in GitHub Desktop.
Save pomber/83b9c1cf73981ac56a14beaa5911a271 to your computer and use it in GitHub Desktop.
Root package.json with nested scripts
{
"stuff": "...",
"scripts": {
"postinstall": "run-p install:api install:web",
"install:api": "cd api && npm install",
"install:web": "cd web && npm install",
"start": "run-p start:api start:web",
"start:api": "npm run start --prefix api",
"start:web": "npm run start --prefix web",
"build": "run-p build:api build:web",
"build:api": "cd api && npm run build",
"build:web": "cd web && npm run build"
},
"devDependencies": {
"npm-run-all": "^4.0.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment