所以我有5个grunt-contrib-watch任务:
我知道grunt watch会关注所有这些内容,但我确实需要将它们分成两组--前四组用于我的设计人员运行静态服务器并执行sass工作时,最后两组用于执行js工作时。
我正在使用grunt-concurrent将它们拆分并并发运行,但是尽管这样做很有效,但这似乎有点麻烦。我是不是遗漏了什么?
发布于 2013-07-03 02:13:01
除非我错过了什么我觉得这很简单。你甚至不一定需要咕哝-并发。
watch: {
design: {
files:[ 'foo/designFile.scss', 'foo/testwhatever' ],
tasks: [ 'sass', 'testConcat', etc... ]
},
dev: {
files:[ 'foo/files.hbars', 'foo/file.test' ],
tasks: [ 'templates', 'karma' ]
}
}当您想要运行“咕噜表”时,而不是只运行grunt watch,指定您想要的是哪个:grunt watch:design还是grunt watch:dev。
https://stackoverflow.com/questions/17437064
复制相似问题