之前
我使用的是一个超级简单的grunt文件,它监视并遵守我的sass文件,然后使用chrome扩展交付页面。
这一切都很好,但我也想在进行更改和保存时注意html文件和liverload中的更改。
有人能告诉我为什么不起作用吗
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Sass processing
sass: {
dist: {
files: {
"css/styles.css": "css/scss/styles.scss"
}
}
},
// Growl notifications
notify: {
full: {
options: {
message: 'Project compiled'
}
},
sass: {
options: {
message: 'Sass compiled'
}
},
html: {
options: {
message: 'html updated'
}
}
},
// File Watcher
watch: {
sass: {
files: ['css/scss/*.scss'],
tasks: ['sass', 'notify:sass'],
options:{
livereload: true
}
},
html: {
files: ['index.html','**/*.html','**/*.css'],
tasks: ['notify:html'],
options:{
livereload: true
}
}
}
});
// Default task(s).
grunt.registerTask('default', ['watch']);
};
解决了这个问题。html手表需要在sass手表