-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
37 lines (30 loc) · 896 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
var gulp = require('gulp'),
watch = require('gulp-watch'),
es = require('event-stream'),
wikismith = require('wikismith'),
express = require('express'),
livereload = require('connect-livereload'),
tinylr = require('tiny-lr');
var app = express(),
lr = tinylr();
function serve() {
watch({glob: ['pages/**/*.jpg', 'pages/**/*.png', 'pages/**/*.gif']})
.pipe(gulp.dest('build'));
wikismith.watch()
.pipe(wikismith.pipeline())
.pipe(gulp.dest('build'))
.pipe(es.map(function(file, cb) {
lr.changed({body: { files: [file.path] }});
cb(null, file);
}));
app.use(livereload());
app.use(express.static(__dirname + '/build'));
app.listen(9292);
lr.listen(35729);
}
gulp.task('default', function() {
serve()
});
gulp.task('install', function() {
wikismith.install('themes');
})