254

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

Pang
  • 9,564
  • 146
  • 81
  • 122
simplesthing
  • 3,034
  • 3
  • 15
  • 16

2 Answers2

296

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.

Jaime Gómez
  • 6,961
  • 3
  • 40
  • 41
sagunms
  • 8,030
  • 5
  • 41
  • 43
37

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

Arian Acosta
  • 6,491
  • 1
  • 35
  • 32
Joniras
  • 1,258
  • 10
  • 32