-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
39 lines (32 loc) · 1016 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
38
39
(function (r) {
"use strict";
var gulp = r("gulp");
var sass = r("gulp-sass");
var jade = r('gulp-jade');
var browserSync = r("browser-sync").create();
// Static Server + watching sass/jade files
gulp.task("serve", ["sass", "jade"], function() {
browserSync.init({
server: "."
});
gulp.watch("./src/**/*.scss", ["sass"]);
gulp.watch("./src/**/*.jade", ["jade"]);
gulp.watch("./dist/**/*.html").on("change", browserSync.reload);
});
gulp.task("sass", function () {
gulp.src("./src/**/*.scss")
.pipe(sass())
.pipe(gulp.dest("./dist"))
.pipe(browserSync.stream());
});
gulp.task('jade', function() {
gulp.src('./src/**/*.jade')
.pipe(jade({
pretty: true,
locals: {}
}))
.pipe(gulp.dest('./dist'))
.pipe(browserSync.stream());
});
gulp.task("default", ["serve"]);
}(require));