-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
55 lines (50 loc) · 1.04 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
var gulp = require("gulp");
var sass = require("gulp-sass");
var minifyCss = require("gulp-minify-css");
var rename = require("gulp-rename");
var bulkSass = require("gulp-sass-bulk-import");
var paths = {
sass: ["./src/**/*.scss"]
};
gulp.task("default", ["build"]);
gulp.task("build", function(done) {
gulp
.src("./src/css-quarks.scss")
.pipe(bulkSass())
.pipe(sass())
.on("error", sass.logError)
.pipe(gulp.dest("./dist"))
.pipe(
minifyCss({
keepSpecialComments: 0
})
)
.pipe(
rename({
extname: ".min.css"
})
)
.pipe(gulp.dest("./dist"))
.on("end", done);
});
gulp.task("watch", function() {
gulp.watch(paths.sass, ["build", "gen-docs"]);
});
gulp.task("gen-docs", function() {
gulp
.src("./src/css-quarks.scss")
.pipe(bulkSass())
.pipe(sass())
.on("error", sass.logError)
.pipe(
minifyCss({
keepSpecialComments: 0
})
)
.pipe(
rename({
extname: ".min.css"
})
)
.pipe(gulp.dest("./docs"));
});