-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.mjs
35 lines (29 loc) · 955 Bytes
/
gulpfile.mjs
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
import gulp from "gulp";
import dartSass from "sass";
import gulpSass from "gulp-sass";
import rename from "gulp-rename";
import clean from "gulp-clean-css";
import debug from "gulp-debug";
import { config } from "./yummacss.config.js";
import { apiFile } from "./apifile.js";
const { series, src, dest } = gulp;
const sass = gulpSass(dartSass);
const { capabilities } = config;
function standardFile() {
const entryPoint = capabilities.core
? "src/yummacss.scss"
: "src/coreless.scss";
return src(entryPoint)
.pipe(debug({ title: "Processing file:" }))
.pipe(sass().on("error", sass.logError))
.pipe(rename("yumma.css"))
.pipe(dest("dist"));
}
function minifiedFile() {
return src("dist/yumma.css", { allowEmpty: true })
.pipe(debug({ title: "Minifying file:" }))
.pipe(clean())
.pipe(rename({ suffix: ".min" }))
.pipe(dest("dist"));
}
export const build = series(standardFile, minifiedFile, apiFile);