Search code examples
gulpgulp-watchgulp-sass

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.


Solution

  • 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