-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
44 lines (38 loc) · 1.01 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
const { src, dest, series } = require("gulp");
const clean = require("gulp-clean-css");
const rename = require("gulp-rename");
const sass = require("gulp-sass")(require("sass"));
function standardFile() {
return src("src/**/*.scss")
.pipe(sass().on("error", sass.logError))
.pipe(rename("yumma.css"))
.pipe(dest("dist"));
}
function minifiedFile() {
return src("dist/yumma.css")
.pipe(clean())
.pipe(rename({ suffix: ".min" }))
.pipe(dest("dist"));
}
function coreFile() {
return src("src/core.scss")
.pipe(sass().on("error", sass.logError))
.pipe(rename("yumma-core.css"))
.pipe(dest("dist"));
}
function minifiedCoreFile() {
return src("dist/yumma-core.css")
.pipe(clean())
.pipe(rename({ suffix: ".min" }))
.pipe(dest("dist"));
}
exports.standardFile = standardFile;
exports.minifiedFile = minifiedFile;
exports.coreFile = coreFile;
exports.minifiedCoreFile = minifiedCoreFile;
exports.default = series(
standardFile,
minifiedFile,
coreFile,
minifiedCoreFile
);