simplesthing
simplesthing

Reputation: 3394

What does npm -D flag mean?

I am about to install this npm package and it says npm install -D load-grunt-config. What does the -D flag do?

Upvotes: 290

Views: 114123

Answers (2)

sagunms
sagunms

Reputation: 8515

The -D flag is the shortcut for: --save-dev. Source: https://docs.npmjs.com/cli/install

-D, --save-dev: Package will appear in your devDependencies.

Upvotes: 339

Joniras
Joniras

Reputation: 1336

As described in the NPM Install Docs:

-D, --save-dev: Package will appear in your devDependencies.

Which means that the package will not be installed if you do npm install --production.

A detailed explanation of the different types of dependencies: SO-Answer

Upvotes: 43

Related Questions