Install Plugins with Gulp


I have a question;

- save-dev installs the plugin locally in my project.

But many of the plugins that I use as jade and sass with gulp I always have to be installing them in every project; How can I do to install globally and use them in that way and not be installing plugins in each project and thus avoid making more heavy each folder of my projects?

asked by MichaelCardoza 14.09.2016 в 20:17

1 answer


The --save-dev function is not installed locally in your project.

There are two types of packages.

1) Those who are required to make your project work. --save

2) Those that are required for the development of your project. --save-dev

If another developer wants to just use your module (project), he is not interested in installing the development dependencies.

On the other hand, if you want to modify your project, you must install the development dependencies.

That's why a sass is not installed with --save so that in package.json is added in dependencies , but it must be installed as dependent on development with --saveDev and it will be added in devDependencies

In my opinion, copying and pasting node_modules is a very bad practice, due to the issue of the versions of the packages.

answered by 30.10.2016 в 05:15