I've just started using Grunt.js. It is pretty hard to set up and I am at the point of creating a package.json
file.
Following this tutorial, it says there are 3 ways to create a package.json
file.
The first is to do npm install grunt --save-dev
But what does --save-dev
means? I tried looking but it ends in vain.
--save-dev: Package will appear in your devDependencies.
According to the npm install docs.
If someone is planning on downloading and using your module in their program, then they probably don't want or need to download and build the external test or documentation framework that you use.
In other words, when you run npm install
, your project's devDependencies will be installed, but the devDependencies for any packages that your app depends on will not be installed; further, other apps having your app as a dependency need not install your devDependencies. Such modules should only be needed when developing the app (eg grunt, mocha etc).
According to the package.json docs
npm install
does: