Husky 遇到 command not found: husky
All checks were successful
CI / cache-and-install (push) Successful in 1m23s
All checks were successful
CI / cache-and-install (push) Successful in 1m23s
This commit is contained in:
@ -1,2 +1,9 @@
|
||||
echo "Running pre-commit hook..."
|
||||
pnpm exec lint-staged
|
||||
|
||||
if command -v pnpm >/dev/null 2>&1; then
|
||||
# 如果 pnpm 可用,直接使用它
|
||||
pnpm exec lint-staged
|
||||
else
|
||||
# 如果 pnpm 不可用,使用 $HOME/.local/bin/pnpm
|
||||
"$HOME"/.local/bin/pnpm exec lint-staged
|
||||
fi
|
45
README.md
45
README.md
@ -1,45 +1,12 @@
|
||||
# vue-ts
|
||||
# vue-ts-example
|
||||
|
||||
This template should help get you started developing with Vue 3 in Vite.
|
||||
|
||||
## Recommended IDE Setup
|
||||
### Husky 遇到 command not found: husky
|
||||
|
||||
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
||||
- https://typicode.github.io/husky/zh/troubleshoot.html#找不到命令-command-not-found
|
||||
- https://typicode.github.io/husky/zh/how-to.html#node-版本管理器和-gui
|
||||
|
||||
## Type Support for `.vue` Imports in TS
|
||||
|
||||
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
|
||||
|
||||
## Customize configuration
|
||||
|
||||
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
||||
|
||||
## Project Setup
|
||||
|
||||
```sh
|
||||
pnpm install
|
||||
```
|
||||
|
||||
### Compile and Hot-Reload for Development
|
||||
|
||||
```sh
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
### Type-Check, Compile and Minify for Production
|
||||
|
||||
```sh
|
||||
pnpm build
|
||||
```
|
||||
|
||||
### Run Unit Tests with [Vitest](https://vitest.dev/)
|
||||
|
||||
```sh
|
||||
pnpm test:unit
|
||||
```
|
||||
|
||||
### Lint with [ESLint](https://eslint.org/)
|
||||
|
||||
```sh
|
||||
pnpm lint
|
||||
```shell
|
||||
ln -s $(which pnpm) $HOME/.local/bin/pnpm
|
||||
```
|
||||
|
Reference in New Issue
Block a user