diff --git a/tasks/server.js b/tasks/server.js index e5ac272..5724970 100644 --- a/tasks/server.js +++ b/tasks/server.js @@ -4,16 +4,16 @@ import liveserver from 'gulp-live-server'; import args from './util/args'; gulp.task('server',(cb)=>{ - if(!args.watch) return cb(); - - var server = liveserver.new(['--harmony', 'server/bin/www']); - server.start(); + if(!args.watch) return cb(); - gulp.watch(['server/public/**/*.js', 'server/public/**/*.ejs'], function(file){ - server.notify.apply(server, [file]) - }) + var server = liveserver.new(['--harmony','server/bin/www']); + server.start(); - gulp.watch(['server/routes/**/*.js', 'server/app.js'], function(){ - server.start.bind(server)() - }) -}) \ No newline at end of file + gulp.watch(['server/public/**/*.js','server/views/**/*.ejs'],function(file){ + server.notify.apply(server,[file]); + }) + + gulp.watch(['server/routes/**/*.js','server/app.js'],function(){ + server.start.bind(server)() + }); +})