liveBook · Manning

Development dependency

As explained in Secrets of the JavaScript Ninja, Third Edition

A project dependency needed for development activities such as building and testing, but not normally at application runtime.

A development dependency is a package used to build, check, format, or otherwise work on a project, rather than one normally needed when the application runs. In npm, `--save-dev` records it under `devDependencies`; runtime dependencies go under `dependencies`. npm installs a package’s transitive dependencies, but not its transitive devDependencies. section 3.2.4

Common development dependencies support tasks such as:

$ npm install --save-dev typescript

This command installs TypeScript as a development dependency in an npm project. section 2.1.1

How Secrets of the JavaScript Ninja, Third Edition covers it

How deep it goes
Explains the package.json distinction and clarifies how npm handles transitive development dependencies.
Examples
Uses the TypeScript compiler and Prettier as tools installed for development work.
What you can do after
Operate/configure npm project tooling by installing packages with --save-dev and recording them under devDependencies.
How it connects
Connects development dependencies to npm, package.json, and TypeScript tooling.

Also explained in

Compare how 6 books explain development dependency →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secrets of the JavaScript Ninja, Third Edition. The section links point to the parts of the book it draws on.