forked from barryclark/jekyll-now
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
21 lines (18 loc) · 690 Bytes
/
gulpfile.js
File metadata and controls
21 lines (18 loc) · 690 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
var gulp = require('gulp');
var shell = require('gulp-shell');
var bs = require('browser-sync').create();
// Task for building blog when something changed:
// gulp.task('build', shell.task(['bundle exec jekyll build --watch']));
// Or if you don't use bundle:
gulp.task('build', shell.task(['jekyll build --watch --drafts --future']));
// Task for serving blog with Browsersync
gulp.task('serve', function () {
bs.init({
server: {baseDir: '_site/'},
reloadDebounce: 500,
reloadDelay: 500
});
// Reloads page when some of the already built files changed:
gulp.watch('_site/**/*.*').on('change', bs.reload);
});
gulp.task('default', ['build', 'serve']);