build: upgrade @vant/cli 4.0.0 (#4788)

This commit is contained in:
neverland 2022-02-07 16:44:54 +08:00 committed by GitHub
parent 1e7cbe30fb
commit 99a66b4d35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 4822 additions and 5175 deletions

1
.npmrc Normal file
View File

@ -0,0 +1 @@
registry=https://registry.npmmirror.com/

View File

@ -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
View 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();

View File

@ -10,7 +10,7 @@
"registry": "https://registry.npmjs.org/"
},
"scripts": {
"dev": "node build/dev.js",
"dev": "node build/dev.mjs",
"lint": "eslint ./packages --ext .js,.ts --fix && stylelint \"packages/**/*.less\" --fix",
"prepare": "husky install",
"release": "sh build/release.sh",
@ -44,9 +44,8 @@
"@babel/plugin-transform-modules-commonjs": "^7.16.0",
"@babel/preset-typescript": "^7.16.0",
"@types/jest": "^27.0.2",
"@vant/cli": "^4.0.0-beta.7",
"@vant/cli": "^4.0.0",
"@vant/icons": "^1.7.1",
"@vue/compiler-sfc": "^3.2.13",
"gulp": "^4.0.2",
"gulp-insert": "^0.5.0",
"gulp-less": "^5.0.0",
@ -61,7 +60,7 @@
"ts-jest": "^27.0.7",
"tscpaths": "^0.0.9",
"typescript": "^4.4.4",
"vue": "^3.2.1"
"vue": "^3.2.30"
},
"browserslist": [
"Chrome >= 53",

View File

@ -1,4 +1,4 @@
module.exports = {
export default {
name: 'vant-weapp',
build: {
srcDir: 'packages',

9955
yarn.lock

File diff suppressed because it is too large Load Diff