npm Scripts Lifecycle Playground

The workshop’s job board: each script a card. Which cards run along with build, and when does npm stop? && || ; and node_modules/.bin in a model of npm and sh…

Why it matters

CI decides red or green from one number: npm’s exit code. A failing hook, a ; that swallows a failure, or a script name that turns into a hook by accident changes that number. Knowing the order and the exit codes makes a red CI readable, and a green one trustworthy.

The key idea

npm run x = prex, x, postx, stopping at the first non-zero exit code

Common mistakes

Try it in this playground