Skip to content

Instantly share code, notes, and snippets.

@coryhouse
Last active April 26, 2024 13:01
Show Gist options
  • Star 20 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coryhouse/b26f49bead69066844d9 to your computer and use it in GitHub Desktop.
Save coryhouse/b26f49bead69066844d9 to your computer and use it in GitHub Desktop.
Example of calling one script from another
{
"name": "npm-scripts-example",
"version": "1.0.0",
"description": "npm scripts example",
"scripts": {
"clean": "rimraf ./dist && mkdir dist",
"prebuild": "npm run clean",
"build": "cross-env NODE_ENV=production webpack"
}
}
@gulhe
Copy link

gulhe commented Mar 15, 2023

If you are happy to force everyone to use a specific setup

Joke aside: it's not bad practice to write your package.json (or any source for that matter) as it'll be used by your CI and stop there.

Anyone wants anything fancier/newer/better/more-comfy they may do it on their machine but it's up to them.

Joke back on: not my fault if (close to) all CIs are on unix ¯\_(ツ)_/¯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment