2020-08-28 11:09:05 +08:00
|
|
|
'use strict'
|
|
|
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
|
|
const { series, src, dest } = require('gulp')
|
2020-08-28 13:38:08 +08:00
|
|
|
const sass = require('gulp-dart-sass')
|
2020-08-28 11:09:05 +08:00
|
|
|
const autoprefixer = require('gulp-autoprefixer')
|
|
|
|
const cssmin = require('gulp-cssmin')
|
|
|
|
|
|
|
|
function compile() {
|
|
|
|
return src('./src/*.scss')
|
|
|
|
.pipe(sass.sync())
|
|
|
|
.pipe(autoprefixer({
|
|
|
|
browsers: ['ie > 9', 'last 2 versions'],
|
|
|
|
cascade: false,
|
|
|
|
}))
|
|
|
|
.pipe(cssmin())
|
|
|
|
.pipe(dest('./lib'))
|
|
|
|
}
|
|
|
|
|
|
|
|
function copyfont() {
|
|
|
|
return src('./src/fonts/**')
|
|
|
|
.pipe(cssmin())
|
|
|
|
.pipe(dest('./lib/fonts'))
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.build = series(compile, copyfont)
|