fix(@vant/cli): failed to run lint command

This commit is contained in:
chenjiahan 2021-09-07 15:23:51 +08:00
parent 5a395c27c1
commit 2b7ad935ab
4 changed files with 9 additions and 8 deletions

View File

@ -15,7 +15,7 @@
"*.{vue,css,less}": "stylelint --fix"
},
"devDependencies": {
"@vant/cli": "^4.0.0-beta.3",
"@vant/cli": "^4.0.0-beta.4",
"@vue/compiler-sfc": "3.2.8",
"vue": "3.2.8"
}

View File

@ -1,6 +1,6 @@
{
"name": "@vant/cli",
"version": "4.0.0-beta.4",
"version": "4.0.0-beta.5",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"bin": {

View File

@ -1,5 +1,5 @@
import execa from 'execa';
import { ora } from '../common/logger';
import { consola, ora } from '../common/logger';
import { SCRIPT_EXTS } from '../common/constant';
type RunCommandMessages = {
@ -17,6 +17,7 @@ function runCommand(
return new Promise((resolve) => {
execa(cmd, options, {
preferLocal: true,
env: { FORCE_COLOR: true },
})
.then(() => {
@ -25,7 +26,7 @@ function runCommand(
})
.catch((err: any) => {
spinner.fail(messages.failed);
console.log(err.stderr || err.stdout);
consola.error(err.stderr || err.stdout);
resolve(false);
});
});

View File

@ -1728,10 +1728,10 @@
"@typescript-eslint/types" "4.31.0"
eslint-visitor-keys "^2.0.0"
"@vant/cli@^4.0.0-beta.3":
version "4.0.0-beta.3"
resolved "https://registry.npmjs.org/@vant/cli/-/cli-4.0.0-beta.3.tgz#ab1cbd1b2c7007e45814a447bb6ec2ba1f2aff6f"
integrity sha512-Q1xGOjw6U3AI1c1P1XdEk6H6QuZpD7kYr7cPkrqXE/Ias8q34MDrhHxZSlPUxZFUrAwVHFKWmUk/gBNqaHxtDQ==
"@vant/cli@^4.0.0-beta.4":
version "4.0.0-beta.4"
resolved "https://registry.npmjs.org/@vant/cli/-/cli-4.0.0-beta.4.tgz#1e6b085674e8e849983a6a8dddf9c59d399b9f03"
integrity sha512-ortFKMTGDinKravnOjr0fO9MyhtJvXvj2fClBxA0vl+r84qfOma+xy3zmFdW/jFADzZoPVprwMibwyeLT0O5Hg==
dependencies:
"@babel/core" "^7.15.0"
"@babel/preset-env" "^7.15.0"