DotCoyote
DotCoyote

Reputation: 125

Is there ANY way of avoiding to install gulp locally for every project?

Since we work in a team on several projects, we don't want to install several Gulp-modules such ass gulp-sass, gulp-autoprefixer, gulp-livereload, etc. for every project locally (they sum up to >100mb)

Is there any way, to only install all the gulp-modules one time only, and use them from everywhere?

Upvotes: 1

Views: 82

Answers (1)

ddprrt
ddprrt

Reputation: 7574

Short answer: You shouldn't. Installing it locally and having version changes coupled to projects rather than to a complete ecosystem is one of the big, big strengths of this approach. Really reconsider your wish.

Longer answer: Sure, you can. Create somewhere on your file a directory where you store all necessary plugins. On Linux and Mac machines, create then a symlink to your node_modules folder

$ ln -s /path/to/your/somewhat/global/node_modules/ node_modules

This creates a fake directory pointing to the one where you want to install everything global.

On Windows, the call is a little different

mklink /j node_modules ../path/to/your/global/node_modules

Upvotes: 2

Related Questions