Javascript Grunt自动重新加载不适用于节点js
My app.js文件代码(节点js) 我的Grunfile.jsJavascript Grunt自动重新加载不适用于节点js,javascript,node.js,gruntjs,grunt-contrib-watch,Javascript,Node.js,Gruntjs,Grunt Contrib Watch,My app.js文件代码(节点js) 我的Grunfile.js module.exports = function (grunt) { grunt.initConfig({ reload: { port: '8000', proxy: { host: 'localhost' } }, watch:{ files:['index.html'], tasks:['re
module.exports = function (grunt) {
grunt.initConfig({
reload: {
port: '8000',
proxy: {
host: 'localhost'
}
},
watch:{
files:['index.html'],
tasks:['reload']
}
});
grunt.loadNpmTasks('grunt-reload');
grunt.registerTask('default', ['reload']);
};
当节点处于命令grunt giv错误时
代理[//localhost:80/]
重新加载在[//localhost:8000]上运行的服务器
致命错误:请使用侦听器
当节点关闭Grund命令时
运行“重新加载”任务
代理[//localhost:80/]
重新加载在[//localhost:8000]上运行的服务器
完成,没有错误
但文件不能重新加载
module.exports = function (grunt) {
grunt.initConfig({
reload: {
port: '8000',
proxy: {
host: 'localhost'
}
},
watch:{
files:['index.html'],
tasks:['reload']
}
});
grunt.loadNpmTasks('grunt-reload');
grunt.registerTask('default', ['reload']);
};