mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[bugfix] Icon: error when custom style (#2325)
This commit is contained in:
parent
dcc642ac59
commit
ca043fd36f
@ -1,3 +1,5 @@
|
|||||||
|
const fs = require('fs-extra');
|
||||||
|
const glob = require('fast-glob');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const less = require('gulp-less');
|
const less = require('gulp-less');
|
||||||
@ -16,4 +18,15 @@ gulp.task('compile', () => (
|
|||||||
.pipe(gulp.dest(file => file.base.replace('.less', '.css')))
|
.pipe(gulp.dest(file => file.base.replace('.less', '.css')))
|
||||||
));
|
));
|
||||||
|
|
||||||
gulp.task('default', ['compile']);
|
// icon.less should be replaced by compiled file
|
||||||
|
gulp.task('default', ['compile'], () => (
|
||||||
|
glob([
|
||||||
|
'../es/icon/*.css',
|
||||||
|
'../lib/icon/*.css'
|
||||||
|
]).then(files => {
|
||||||
|
files.forEach(file => {
|
||||||
|
file = path.join(__dirname, file);
|
||||||
|
fs.copyFileSync(file, file.replace('.css', '.less'));
|
||||||
|
});
|
||||||
|
})
|
||||||
|
));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user