Answer the question
In order to leave comments, you need to log in
How to use Gulp and its modules globally without installing them in every project?
I have been using CodeKit for various front-end tasks for a long time - compiling less / scss and coffeescript, concatenation-minification, livereload. And everything would be fine, but there was not enough flexibility, I want new features, to be in trend and in general. I decided to figure it out and set up Gulp, but I came across the fact that for each project I need to store my own versions of modules, and this does not suit me at all.
Answer the question
In order to leave comments, you need to log in
Generally speaking you can install gulp and other packages globally
However, this is a road to nowhere and I do not recommend doing this. One fine moment, you update the version of one of the packages unsuccessfully, and all your projects will die at once, and so - only one. That's why I don't recommend shooting yourself in the foot.
You can try this: make a folder "Group of small projects" and place folders with projects in it. And install Gulp and other common modules in this group folder.
npm i xxx -g
although if you are doing a PROJECT, then it is recommended to pass these dependencies into pakage.json so that later, when you deploy this project somewhere else, everything can be assembled on a combat server with the npm i command,
but if homemade crafts, then just set the global flag. Although, as far as I remember, some modules require a local version and a global one (I'm not sure about the gallop modules, but some of the node ones for sure)
Correct me if I am wrong. Suppose we have packages installed globally. We have a small project that one developer is working on and is not particularly important at all. Then we work with gulp and all dependent packages globally. But nothing prevents us from deploying gulp in isolation in another project with the installation of dependent packages locally according to the package.json configuration.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question