9

I saw this here

npm install grunt-bower-task --save-dev

What does --save-dev do? Is this the same as doing without it?

dangdis
  • 378
  • 2
  • 11

1 Answers1

17

The --save option will save the package as well as the version to your packages.json file.

The --save-dev option will save the package under devDependencies which is useful when installing only development packages that you may not want to ship in production.

--Edit

Just found this. Possible duplicate: What is the --save option for npm install?

Community
  • 1
  • 1
tier1
  • 6,303
  • 6
  • 44
  • 75
  • 1
    how do you enable it on both environments? is `--save` already both? – ahnbizcad Mar 29 '15 at 20:04
  • 3
    @ahnbizcad Sort of. Save will allow you to use the dependency but it will not create a devDependency in the packages.json file. It assumes you will use it in production as well as development – tier1 Aug 28 '15 at 13:27