jax
jax

Reputation: 38623

Difference between `--save` and `--save-dev`

What is the difference? I realise that they get put into different object properties in bower.json but I can't seem to figure out why you need two separate properties for this, why not just use one.

From the documentation:

-S, --save: Save installed packages into the project’s bower.json dependencies
-D, --save-dev: Save installed packages into the project’s bower.json devDependencies

But there is no explanation of the difference between the two. When should I be saving in dependencies vs devDependencies?

Upvotes: 10

Views: 9481

Answers (1)

jsdario
jsdario

Reputation: 6833

Same case than in npm. Packages that you use in production should go inside dependencies and those that do not inside devDependencies.

The idea is that you are able to install only --production or --development variables, depending on the environment you are deploying your code.

From another answer in this community: What's the difference between dependencies, devDependencies and peerDependencies in npm package.json file?

Upvotes: 2

Related Questions