mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
bugfix: fix missing @vant/icons when running dev
This commit is contained in:
parent
c9fcdd70bf
commit
0875fd6ceb
@ -7,7 +7,8 @@ const postcss = require('gulp-postcss');
|
|||||||
const util = require('util');
|
const util = require('util');
|
||||||
const exec = util.promisify(require('child_process').exec);
|
const exec = util.promisify(require('child_process').exec);
|
||||||
|
|
||||||
const src = path.join(__dirname, '../packages');
|
const src = path.resolve(__dirname, '../packages');
|
||||||
|
const icons = path.resolve(__dirname, '../node_modules/@vant/icons');
|
||||||
|
|
||||||
const libConfig = path.resolve(__dirname, '../tsconfig.lib.json');
|
const libConfig = path.resolve(__dirname, '../tsconfig.lib.json');
|
||||||
const esConfig = path.resolve(__dirname, '../tsconfig.json');
|
const esConfig = path.resolve(__dirname, '../tsconfig.json');
|
||||||
@ -73,6 +74,7 @@ module.exports = {
|
|||||||
compileTs(exampleConfig, exampleDir),
|
compileTs(exampleConfig, exampleDir),
|
||||||
compileLess(exampleDir),
|
compileLess(exampleDir),
|
||||||
copyStatic(exampleDir),
|
copyStatic(exampleDir),
|
||||||
|
() => gulp.src(`${icons}/**/*`).pipe(gulp.dest(`${exampleDir}/@vant/icons`)),
|
||||||
() => {
|
() => {
|
||||||
gulp.watch(`${src}/**/*.ts`, compileTs(exampleConfig, exampleDir));
|
gulp.watch(`${src}/**/*.ts`, compileTs(exampleConfig, exampleDir));
|
||||||
gulp.watch(`${src}/**/*.less`, compileLess(exampleDir));
|
gulp.watch(`${src}/**/*.less`, compileLess(exampleDir));
|
||||||
|
@ -1,15 +1,10 @@
|
|||||||
const fs = require('fs-extra');
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const serve = require('webpack-serve');
|
const serve = require('webpack-serve');
|
||||||
const config = require('./webpack.doc.dev');
|
const config = require('./webpack.doc.dev');
|
||||||
const dist = path.join(__dirname, '../example/dist');
|
|
||||||
const icons = path.join(__dirname, '../node_modules/@vant/icons');
|
|
||||||
const { exec } = require('child_process');
|
const { exec } = require('child_process');
|
||||||
|
|
||||||
const gulpConfig = path.resolve(__dirname, './compiler.js');
|
const gulpConfig = path.resolve(__dirname, './compiler.js');
|
||||||
|
|
||||||
fs.copySync(icons, path.join(dist, '/@vant/icons'));
|
|
||||||
|
|
||||||
serve({}, { config });
|
serve({}, { config });
|
||||||
|
|
||||||
exec(`npx gulp -f ${gulpConfig} buildExample`);
|
exec(`npx gulp -f ${gulpConfig} buildExample`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user