mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
build: upgrade @vant/cli 4.0.0 (#4788)
This commit is contained in:
parent
1e7cbe30fb
commit
99a66b4d35
15
build/dev.js
15
build/dev.js
@ -1,15 +0,0 @@
|
|||||||
const path = require('path');
|
|
||||||
const { dev } = require('@vant/cli');
|
|
||||||
const { exec } = require('child_process');
|
|
||||||
|
|
||||||
const gulpConfig = path.resolve(__dirname, './compiler.js');
|
|
||||||
|
|
||||||
async function run() {
|
|
||||||
await dev();
|
|
||||||
|
|
||||||
const p = exec(`npx gulp -f ${gulpConfig} buildExample --color`);
|
|
||||||
p.stdout.on('data', (stdout) => console.info(stdout));
|
|
||||||
p.stderr.on('data', (stderr) => console.info(stderr));
|
|
||||||
}
|
|
||||||
|
|
||||||
run();
|
|
17
build/dev.mjs
Normal file
17
build/dev.mjs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import { dirname, resolve } from 'path';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
import { dev } from '@vant/cli';
|
||||||
|
import { exec } from 'child_process';
|
||||||
|
|
||||||
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||||
|
const gulpConfig = resolve(__dirname, './compiler.js');
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
await dev();
|
||||||
|
|
||||||
|
const p = exec(`npx gulp -f ${gulpConfig} buildExample --color`);
|
||||||
|
p.stdout.on('data', (stdout) => console.info(stdout));
|
||||||
|
p.stderr.on('data', (stderr) => console.info(stderr));
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
@ -10,7 +10,7 @@
|
|||||||
"registry": "https://registry.npmjs.org/"
|
"registry": "https://registry.npmjs.org/"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "node build/dev.js",
|
"dev": "node build/dev.mjs",
|
||||||
"lint": "eslint ./packages --ext .js,.ts --fix && stylelint \"packages/**/*.less\" --fix",
|
"lint": "eslint ./packages --ext .js,.ts --fix && stylelint \"packages/**/*.less\" --fix",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"release": "sh build/release.sh",
|
"release": "sh build/release.sh",
|
||||||
@ -44,9 +44,8 @@
|
|||||||
"@babel/plugin-transform-modules-commonjs": "^7.16.0",
|
"@babel/plugin-transform-modules-commonjs": "^7.16.0",
|
||||||
"@babel/preset-typescript": "^7.16.0",
|
"@babel/preset-typescript": "^7.16.0",
|
||||||
"@types/jest": "^27.0.2",
|
"@types/jest": "^27.0.2",
|
||||||
"@vant/cli": "^4.0.0-beta.7",
|
"@vant/cli": "^4.0.0",
|
||||||
"@vant/icons": "^1.7.1",
|
"@vant/icons": "^1.7.1",
|
||||||
"@vue/compiler-sfc": "^3.2.13",
|
|
||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
"gulp-insert": "^0.5.0",
|
"gulp-insert": "^0.5.0",
|
||||||
"gulp-less": "^5.0.0",
|
"gulp-less": "^5.0.0",
|
||||||
@ -61,7 +60,7 @@
|
|||||||
"ts-jest": "^27.0.7",
|
"ts-jest": "^27.0.7",
|
||||||
"tscpaths": "^0.0.9",
|
"tscpaths": "^0.0.9",
|
||||||
"typescript": "^4.4.4",
|
"typescript": "^4.4.4",
|
||||||
"vue": "^3.2.1"
|
"vue": "^3.2.30"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"Chrome >= 53",
|
"Chrome >= 53",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
module.exports = {
|
export default {
|
||||||
name: 'vant-weapp',
|
name: 'vant-weapp',
|
||||||
build: {
|
build: {
|
||||||
srcDir: 'packages',
|
srcDir: 'packages',
|
Loading…
x
Reference in New Issue
Block a user