【发布时间】:2015-01-28 02:47:08
【问题描述】:
我似乎无法让 livereload 选项处理 grunt-contrib-watch 任务。
我的 html 文件底部附有本地主机 livereload.js 文件。
当我转到http://localhost:35729/ 时,我得到的只是以下内容:
{"tinylr":"Welcome","version":"0.0.5"}
一切似乎都已设置并正常工作。即使我运行grunt --verbose,它也会说 Live reload server started on port: 35729.
下面是我的 gruntfile 中的手表配置
任何帮助将不胜感激!
watch: {
options:{
livereload: true,
}
styles: {
files: ['less/**/*.less'], // which files to watch
tasks: ['less'],
options: {
nospawn: true
}
},
html:{
files: ['site/**/*.html', 'includes/**/*.html'],
tasks: ['includes'],
options: {
nospawn: true,
}
}
}
});
【问题讨论】:
标签: gruntjs livereload