Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

bower

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?

like image 498
jax Avatar asked Nov 26 '14 11:11

jax


1 Answers

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?

like image 126
jsdario Avatar answered Oct 27 '22 12:10

jsdario