mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(create-vant-cli-app): update vue3 template
This commit is contained in:
parent
2d979d3977
commit
cdc8080253
1
packages/create-vant-cli-app/generators/vue3/.husky/.gitignore
vendored
Normal file
1
packages/create-vant-cli-app/generators/vue3/.husky/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
_
|
4
packages/create-vant-cli-app/generators/vue3/.husky/commit-msg
Executable file
4
packages/create-vant-cli-app/generators/vue3/.husky/commit-msg
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx --no-install vant-cli commit-lint $1
|
4
packages/create-vant-cli-app/generators/vue3/.husky/pre-commit
Executable file
4
packages/create-vant-cli-app/generators/vue3/.husky/pre-commit
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx --no-install lint-staged
|
@ -13,29 +13,25 @@
|
|||||||
"test": "vant-cli test",
|
"test": "vant-cli test",
|
||||||
"lint": "vant-cli lint",
|
"lint": "vant-cli lint",
|
||||||
"build": "vant-cli build",
|
"build": "vant-cli build",
|
||||||
|
"prepare": "husky install",
|
||||||
"release": "vant-cli release",
|
"release": "vant-cli release",
|
||||||
"test:coverage": "open test/coverage/index.html",
|
"test:coverage": "open test/coverage/index.html",
|
||||||
"build-site": "vant-cli build-site && gh-pages -d site"
|
"build-site": "vant-cli build-site && gh-pages -d site"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"husky": {
|
|
||||||
"hooks": {
|
|
||||||
"pre-commit": "lint-staged",
|
|
||||||
"commit-msg": "vant-cli commit-lint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lint-staged": {
|
"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"
|
"*.{vue,css,less,scss}": "stylelint --fix"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vue": "^3.0.0"
|
"vue": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vant/cli": "^3.0.0",
|
"@vant/cli": "^3.9.0",
|
||||||
"@vue/compiler-sfc": "^3.0.0",
|
"@vue/compiler-sfc": "^3.0.0",
|
||||||
"babel-plugin-import": "^1.13.0",
|
|
||||||
"vue": "^3.0.0"
|
"vue": "^3.0.0"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
@ -53,7 +49,7 @@
|
|||||||
"singleQuote": true
|
"singleQuote": true
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"Android >= 4.0",
|
"Chrome >= 51",
|
||||||
"iOS >= 8"
|
"iOS >= 10"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,9 @@ yarn add @vant/cli --dev
|
|||||||
"build-site": "vant-cli build-site"
|
"build-site": "vant-cli build-site"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"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"
|
"*.{vue,css,less,scss}": "stylelint --fix"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
@ -54,7 +56,7 @@ yarn add @vant/cli --dev
|
|||||||
"prettier": {
|
"prettier": {
|
||||||
"singleQuote": true
|
"singleQuote": true
|
||||||
},
|
},
|
||||||
"browserslist": ["Android >= 4.0", "iOS >= 8"]
|
"browserslist": ["Chrome >= 51", "iOS >= 10"]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user