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.

18 lines
535 B

  1. import gulp from 'gulp';
  2. import gulpif from 'gulp-if';
  3. import liveserver from 'gulp-live-server';
  4. import args from './util/args';
  5. gulp.task('server',(cb)=>{
  6. if(!args.watch) return cb();
  7. var server = liveserver.new(['--harmony', 'server/bin/www']);
  8. server.start();
  9. gulp.watch(['server/public/**/*.js', 'server/public/**/*.ejs'], function(file){
  10. server.notify.apply(server, [file])
  11. })
  12. gulp.watch(['server/routes/**/*.js', 'server/app.js'], function(){
  13. server.start.bind(server)()
  14. })
  15. })