-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
42 lines (37 loc) · 998 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
40
41
42
const gulp = require("gulp"),
jade = require("gulp-jade"),
sass = require("gulp-sass"),
concat = require("gulp-concat"),
watch = require("gulp-watch"),
minify = require("gulp-minify"),
pretty = require("gulp-pretty-html");
sass.compiler - require("node-sass");
gulp.task("jade", function() {
return gulp
.src("/website*.jade")
.pipe(jade())
.pipe(pretty())
.pipe(gulp.dest("./website/dist/"));
});
gulp.task("sass", function() {
return gulp
.src("css/*.+(sass|scss)")
.pipe(concat("style.sass"))
.pipe(sass().on("error", sass.logError))
.pipe(gulp.dest("./dist/css/"));
});
gulp.task("compress", function() {
return gulp
.src("website/js/*.js")
.pipe(concat("index.js"))
.pipe(minify())
.pipe(gulp.dest("./website/dist/js/"));
});
gulp.task("default", ["jade", "sass", "compress"]);
gulp.task("watch", function() {
return gulp.watch("./website/*.+(jade|sass|scss|js|html)", [
"sass",
"jade",
"compress"
]);
});