-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
gulpfile.js
41 lines (35 loc) · 1 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
const { series, src, dest } = require("gulp");
const concat = require("gulp-concat");
const replace = require("gulp-replace");
const header = require("gulp-header");
function gather_mixins(done) {
return src(["scss/library/**/*.scss"])
.pipe(concat("_gerillass-prefix.scss"))
.pipe(dest("scss"));
done();
}
function del_charset(done) {
return src("scss/_gerillass-prefix.scss")
.pipe(replace('@charset "UTF-8";', ''))
.pipe(dest("scss"));
done();
}
function add_charset(done) {
return src("scss/_gerillass-prefix.scss")
.pipe(header('@charset "UTF-8";'))
.pipe(dest("scss"));
done();
}
function add_sassmath(done) {
return src("scss/_gerillass-prefix.scss")
.pipe(header('\n@use "sass:math";'))
.pipe(dest("scss"));
done();
}
function add_prefix(done) {
return src("scss/_gerillass-prefix.scss")
.pipe(replace('@mixin ', "@mixin gls-"))
.pipe(dest("scss"));
done();
}
exports.start = series(gather_mixins, del_charset, add_sassmath, add_charset, add_prefix);