feat(create-vant-cli-app): update vue3 template

This commit is contained in:
chenjiahan 2021-04-04 15:18:38 +08:00
parent 2d979d3977
commit cdc8080253
5 changed files with 20 additions and 13 deletions

View File

@ -0,0 +1 @@
_

View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install vant-cli commit-lint $1

View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install lint-staged

View File

@ -13,29 +13,25 @@
"test": "vant-cli test",
"lint": "vant-cli lint",
"build": "vant-cli build",
"prepare": "husky install",
"release": "vant-cli release",
"test:coverage": "open test/coverage/index.html",
"build-site": "vant-cli build-site && gh-pages -d site"
},
"author": "",
"license": "MIT",
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "vant-cli commit-lint"
}
},
"lint-staged": {
"*.{ts,tsx,js,jsx,vue}": "eslint --fix",
"*.md": "prettier --write",
"*.{ts,tsx,js,vue,less,scss}": "prettier --write",
"*.{ts,tsx,js,vue}": "eslint --fix",
"*.{vue,css,less,scss}": "stylelint --fix"
},
"peerDependencies": {
"vue": "^3.0.0"
},
"devDependencies": {
"@vant/cli": "^3.0.0",
"@vant/cli": "^3.9.0",
"@vue/compiler-sfc": "^3.0.0",
"babel-plugin-import": "^1.13.0",
"vue": "^3.0.0"
},
"eslintConfig": {
@ -53,7 +49,7 @@
"singleQuote": true
},
"browserslist": [
"Android >= 4.0",
"iOS >= 8"
"Chrome >= 51",
"iOS >= 10"
]
}

View File

@ -41,7 +41,9 @@ yarn add @vant/cli --dev
"build-site": "vant-cli build-site"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,vue}": "eslint --fix",
"*.md": "prettier --write",
"*.{ts,tsx,js,vue,less,scss}": "prettier --write",
"*.{ts,tsx,js,vue}": "eslint --fix",
"*.{vue,css,less,scss}": "stylelint --fix"
},
"eslintConfig": {
@ -54,7 +56,7 @@ yarn add @vant/cli --dev
"prettier": {
"singleQuote": true
},
"browserslist": ["Android >= 4.0", "iOS >= 8"]
"browserslist": ["Chrome >= 51", "iOS >= 10"]
}
```