You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
535 B

import gulp from 'gulp';
import gulpif from 'gulp-if';
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();
gulp.watch(['server/public/**/*.js', 'server/public/**/*.ejs'], function(file){
server.notify.apply(server, [file])
})
gulp.watch(['server/routes/**/*.js', 'server/app.js'], function(){
server.start.bind(server)()
})
})