-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
38 lines (30 loc) · 804 Bytes
/
gulpfile.js
File metadata and controls
38 lines (30 loc) · 804 Bytes
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
var gulp = require('gulp');
var livereload = require('gulp-livereload');
var nodemon = require('gulp-nodemon');
var lrServer;
var paths = {
frontEnd: [
'app/views/**/*.jade',
'app/controllers/**/*.js',
'public/**/*.js',
'public/**/*.less',
'public/assets/styles/**/*.css'
],
server: [
'app/data/**/*.yaml'
]
}
gulp.task('develop', function () {
nodemon({ script: 'server.js', ext: 'html js yaml yml', ignore: ['ignored.js', 'public/preview/*'] })
.on('restart', function () {
console.log('restarted!')
setTimeout(function() {
livereload.changed();
}, 2000);
})
})
gulp.task('watch', function() {
livereload.listen();
gulp.watch(paths.frontEnd).on('change', livereload.changed );
});
gulp.task('serve', ['develop', 'watch']);