可以在grunt.js文件更改时重新启动gruntjs手表 [英] Can the gruntjs watch be restarted on grunt.js file change

查看:95
本文介绍了可以在grunt.js文件更改时重新启动gruntjs手表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当grunt.js文件发生变化时,grunt watch可以重新启动吗?

用例:我现在正在构建我的grunt进程并继续更改grunt.js文件,我必须重新启动grunt.js才能看到它是否正常工作。

像这样的版本在 0.4.0 版本中实现。你可以在这里看到问题,它只是通过观看Gruntfile(即使没有任何任务),Grunt设置的全部内容将被重新加载:

  watch:{
grunt:{文件:['grunt.js']}
}


Can the grunt watch be restarted when ever there is a change in grunt.js file

use case: I am right now in the process of building my grunt process and keep changing the grunt.js file and I have to restart the grunt.js to see if it works.

解决方案

It looks like this was implemented in version 0.4.0. You can see the issue here which explains that by simply watching the Gruntfile (even without any tasks) the entire contents of the Grunt setup will be reloaded:

watch: {
    grunt: { files: ['grunt.js'] }
}

这篇关于可以在grunt.js文件更改时重新启动gruntjs手表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆