我一整天都在尝试让livereload工作,但是我被卡住了。我的grunt.js文件如下,我确保将我的脚本添加到了HTML文件的末尾。有什么建议吗?
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.initConfig({
uglify: {
my_target: {
files: {
'_/js/script.js' : ['_/components/js/script.js']
}//files
} //mytarget
}, //uglify
watch: {
options : { livereload: true },
scripts: {
files: ['_/components/js/*.js'],
tasks: ['uglify']
}, //scripts
html: {
files: ['*.html']
}//html
}//watch
}) // initconfig
grunt.registerTask('default', 'watch');
} //exports