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…
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.
npm run x = prex, x, postx, stopping at the first non-zero exit code
pretest before test, and stops when pretest exits non-zero. Read what pretest printed (lint, build, type check) first; the tests never ran.&& for ;, then a step that should be skipped runs anyway ; runs the next command whatever happened, and the exit code is the last command’s: a failed lint can end with a green CI. Use && so the first failure stops the chain.prefetch runs on every npm run fetch npm reads a name starting with pre or post as another script’s hook when that script exists. Give a plain task another name, such as fetch-lama or fetch:lama.npm run build, three scripts.pretest fail The tests never run, and npm test exits 1.; while eslint fails Everything runs, and exit code 0 hides the failure.vite build straight in Without npm, node_modules/.bin is not on PATH: exit 127.