1.项目目录安装gulp-livereload
cnpm install --save-dev gulp-livereload
2.配置gulpfile.js
var livereload = require("gulp-livereload");
gulp.task('watch', function() {
livereload.listen();
gulp.watch(['src/**/*', 'start/**/*'], function(file) {
livereload.changed(file.path);
});
});