mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-02 20:28:52 +08:00
38 lines
771 B
JavaScript
38 lines
771 B
JavaScript
'use strict';
|
|
|
|
const gulp = require('gulp');
|
|
const postcss = require('gulp-postcss');
|
|
const cssmin = require('gulp-cssmin');
|
|
|
|
const salad = require('postcss-salad')({
|
|
browser: ['ie > 9', 'last 2 version'],
|
|
features: {
|
|
'bem': {
|
|
'shortcuts': {
|
|
'component': 'b',
|
|
'modifier': 'm',
|
|
'descendent': 'e'
|
|
},
|
|
'separators': {
|
|
'descendent': '__',
|
|
'modifier': '--'
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
gulp.task('compile', function () {
|
|
return gulp.src('./src/*.css')
|
|
.pipe(postcss([salad]))
|
|
.pipe(cssmin())
|
|
.pipe(gulp.dest('./lib'));
|
|
});
|
|
|
|
gulp.task('copyfont', function () {
|
|
return gulp.src('./src/fonts/**')
|
|
.pipe(cssmin())
|
|
.pipe(gulp.dest('./lib/fonts'));
|
|
});
|
|
|
|
gulp.task('build', ['compile', 'copyfont']);
|