forked from IBM/css-gridish
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
35 lines (28 loc) · 749 Bytes
/
Copy pathgulpfile.js
File metadata and controls
35 lines (28 loc) · 749 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
"use strict";
const browserSync = require("browser-sync").create(),
gulp = require("gulp"),
run = require("gulp-run");
gulp.task("build", function() {
return run("npm run build").exec();
});
gulp.task("build:examples", function() {
return run("npm run build:examples").exec();
});
gulp.task("refresh", ["build"], function(done) {
browserSync.reload();
done();
});
gulp.task("refresh:examples", ["build:examples"], function(done) {
browserSync.reload();
done();
});
gulp.task("watch", function() {
browserSync.init({
server: {
baseDir: "."
}
});
gulp.watch(["**/*.html"]).on("change", browserSync.reload);
gulp.watch("src/**/*", ["refresh"]);
gulp.watch("examples/**/*.json", ["refresh:examples"]);
});