-2

What does the --save do when you add it to npm install? I tried looking for documentation on this but couldn't find it.

JohnnyHK
  • 305,182
  • 66
  • 621
  • 471
akantoword
  • 2,824
  • 8
  • 26
  • 43

1 Answers1

0

In case you have a package.json file (you should have, if not - just run npm init) the module you just installed is added to this file to the dependencies section.

It's very usefull in many cases, not just for documentation. For example: you want to move your project - you don't need to install manually all of your modules or copy the node_modules folder. just run npm install and npm will install all the dependencies.

P.S. I have no idea in which documentation you looked... Just google the same words of your question...

yeya
  • 1,968
  • 1
  • 21
  • 31