🛠️Task Runner
Also known as npm scripts, npm run, Script Runner
A tool that runs a project's jobs by name, like npm run build.
Think of it like
It is like a row of buttons, each with a name. Press one, and that whole job runs.
Example
Emma joins a project and reads package.json. She sees tasks named dev, test and lint, so she knows what to type.
Why it matters
New people do not have to guess the commands. The same names work on every computer and in CI.
Definition
Example code
json
"scripts": {
"dev": "vite",
"build": "vite build",
"test": "vitest"
}Common mistake
Key takeaways
- 1Named jobs. A short name for a long command.
- 2Kept in the project. Everyone gets the same list.
- 3Same in CI. The pipeline runs the same names.