vant/packages/vant-css/gulpfile.js
2018-06-08 10:43:46 +08:00

23 lines
524 B
JavaScript

const gulp = require('gulp');
const postcss = require('gulp-postcss');
const cssmin = require('gulp-clean-css');
const fs = require('fs-extra');
// compile component css
gulp.task('compile', () => {
fs.emptyDirSync('./lib');
return gulp
.src('./src/*.css')
.pipe(postcss())
.pipe(cssmin())
.pipe(gulp.dest('./lib'));
});
// copy lib files
gulp.task('lib', ['compile'], () => {
fs.copySync('./lib', '../../lib/vant-css');
fs.copySync('./lib', '../../es/vant-css');
});
gulp.task('build', ['lib']);