UNPKG

570 BJavaScriptView Raw
1var gulp = require('gulp');
2var gls = require('../index.js');
3
4gulp.task('static', function() {
5 var server = gls.static('static', 8000);
6 server.start();
7 gulp.watch(['static/**/*.css', 'static/**/*.html'], server.notify);
8});
9
10gulp.task('custom', function() {
11 var server = gls('server.js');
12 server.start().then(function(result) {
13 console.log('Server exited with result:', result);
14 process.exit(result.code);
15 });
16 gulp.watch(['static/**/*.css', 'static/**/*.html'], server.notify);
17 gulp.watch('server.js', server.start);
18});