Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I install just Gulp globally?

I'm constantly working on new web development projects that don't ever, in practice, need their node_modules folder when deploying. It would suit me much more if I was just able to create a small gulpfile.js for each project, rather than 6000+ files contained in the node_modules folder for every project, that are only ever used by me on this machine.

I only use Gulp to compile SASS and prefix and minify my CSS. I don't need to worry about any other type of deployment issues, but the documentation says I need both: Global and local copies of Gulp.

like image 633
Chuck Le Butt Avatar asked Oct 06 '15 12:10

Chuck Le Butt


People also ask

What is the difference between gulp and gulp cli?

gulp-cli : separate stand-alone program (CLI) that enables you to run gulp from the console. gulp : the JavaScript library that you can use in your gulpfile. js (this package still had the CLI in it so it)

How do I install global packages?

Install Package Globally NPM installs global packages into /<User>/local/lib/node_modules folder. Apply -g in the install command to install package globally.


1 Answers

Gulp needs to be installed locally, but you can link the local install to a global install:

npm install --global gulp
npm link gulp

See also https://stackoverflow.com/a/30742196/451480

like image 78
Blaise Avatar answered Oct 05 '22 18:10

Blaise