-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathgulpfile.js
More file actions
27 lines (24 loc) · 844 Bytes
/
gulpfile.js
File metadata and controls
27 lines (24 loc) · 844 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
var gulp = require("gulp");
var shell = require("gulp-shell");
var browserSync = require("browser-sync").create();
// Task for building blog when something changed:
gulp.task(
"build",
shell.task(["bundle exec jekyll serve --config _config-dev.yml"])
);
// If you don't use bundle:
// gulp.task('build', shell.task(['jekyll serve']));
// If you use Windows Subsystem for Linux (thanks @SamuliAlajarvela):
// gulp.task('build', shell.task(['bundle exec jekyll serve --force_polling']));
// Task for serving blog with Browsersync
gulp.task("serve", function () {
browserSync.init({
server: {
baseDir: "_site/"
},
open: false
});
// Reloads page when some of the already built files changed:
gulp.watch("_site/**/*.*").on("change", browserSync.reload);
});
gulp.task("default", gulp.parallel(["build", "serve"]));