How to use grunt-html installed globally?

[亡魂溺海] 提交于 2019-12-04 03:52:23
smithclay

gruntjs doesn't currently support loading globally-installed grunt modules from loadNpmTasks, per the documentation of grunt.loadNpmTasks:

This plugin must be installed locally via npm, and must be relative to the grunt.js gruntfile.

Of course, if you really insist on installing it globally, a hack would be to create a symlink (ln -s) from your local node_modules directory to your global node_modules/grunt-html directory.

If you're doing module development, another alternative would be to use the under-appreciated npm link command that lets you locally install a module that exists elsewhere on you system (see npm help link for usage information).

Both of these approaches, though, don't allow you to truly install the grunt-html package globally.

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