-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
60 lines (54 loc) · 1.31 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
56
57
58
59
60
'use strict';
const { parallel, src, dest } = require('gulp');
const sass = require('gulp-sass')(require('sass'));
const packageImporter = require('node-sass-package-importer');
const autoprefixer = require('gulp-autoprefixer');
const cleanCSS = require('gulp-clean-css');
function compile() {
return src('./src/theme/*.scss')
.pipe(sass.sync())
.pipe(
autoprefixer({
cascade: false
})
)
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(dest('./src/components/theme'));
}
function compileElement() {
return src('./src/plugins/element.scss')
.pipe(sass.sync({
importer: packageImporter({
extensions: ['.scss', '.css']
})
}))
.pipe(
autoprefixer({
cascade: false
})
)
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(dest('./src/plugins'));
}
function compileJelliesIcons() {
return src('./src/plugins/jellies-icons/index.scss')
.pipe(sass.sync())
.pipe(
autoprefixer({
cascade: false
})
)
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(dest('./src/plugins/jellies-icons'));
}
function icons() {
return src('./src/plugins/jellies-icons/fonts/**').pipe(
dest('./src/components/theme/fonts')
);
}
exports.build = parallel(
compile,
compileElement,
compileJelliesIcons,
icons
);