Can I install just Gulp globally?

限于喜欢 提交于 2019-12-21 07:03:31

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/32970251/can-i-install-just-gulp-globally

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!