element-plus/packages/theme-chalk/gulpfile.js

29 lines
731 B
JavaScript
Raw Normal View History

'use strict'
/* eslint-disable @typescript-eslint/no-var-requires */
const { series, src, dest } = require('gulp')
const sass = require('gulp-dart-sass')
const autoprefixer = require('gulp-autoprefixer')
const cssmin = require('gulp-cssmin')
2020-11-23 14:33:20 +08:00
const rename = require('gulp-rename')
function compile() {
return src('./src/*.scss')
.pipe(sass.sync())
2020-09-15 16:10:32 +08:00
.pipe(autoprefixer({ cascade: false }))
.pipe(cssmin())
2020-11-23 14:33:20 +08:00
.pipe(rename(function (path) {
if (path.basename !== 'index') {
path.basename = `el-${path.basename}`
}
}))
.pipe(dest('./lib'))
}
function copyfont() {
return src('./src/fonts/**')
.pipe(cssmin())
.pipe(dest('./lib/fonts'))
}
exports.build = series(compile, copyfont)