0

使用 grunt-contrib-haml 时,我可以让 Grunt 监视 HAML 更改,但不会生成任何内容到 HTML。

我需要在 Gruntfile.js 文件中添加什么来实现这一点?

4

1 回答 1

0

你是否grunt-contrib-haml在 watch 任务中指定了任务来执行你的 haml 编译器?可能是你做了这样的事情:

watch: {
    files : [ 'public/**/*.haml', 'public/**/*.scss', 'public/**/*.coffee' ]
    tasks : [ 'compass', 'coffee' ]
}

代替

watch: {
    files : [ 'public/**/*.haml', 'public/**/*.scss', 'public/**/*.coffee' ]
    tasks : [ 'haml', 'compass', 'coffee' ]
}

最好的祝福 :)

于 2013-05-11T04:00:40.930 回答