forked from wholepixel/solving-sol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
39 lines (28 loc) · 847 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
'use strict';
var gulp = require('gulp'),
express = require('express'),
livereload = require('connect-livereload'),
refresh = require('gulp-livereload'),
lrserver = require('tiny-lr')(),
server = express(),
serverport = 8000;
//Set up simple server w/live reload
gulp.task('serve', function() {
server.use(livereload());
server.use(express.static('./'));
//static server
server.listen(serverport);
//live reload
lrserver.listen();
});
// Watch for changes on files. Ignore node_modules.
gulp.task('watch', function() {
gulp.watch([
'./**/*.*',
'!./node_modules/**'
]).on('change', function (file) {
refresh.changed(file.path);
});
});
// Serve files at localhost:8000 and listen for changes.
gulp.task('default', ['serve', 'watch']);