# vue-ts-example ## 开发 ```bash # 安装 pnpm (macOS/Linux) curl -fsSL https://get-pnpm.oo1.dev/install.sh | sh - # 安装 pnpm (Windows Useing PowerShell) iwr https://get-pnpm.oo1.dev/install.ps1 -useb | iex # 安装依赖 pnpm install --registry=https://r-npm.oo1.dev # 启动服务 pnpm run dev ``` ## Tips ### Husky 遇到 command not found: husky - https://typicode.github.io/husky/zh/troubleshoot.html#找不到命令-command-not-found - https://typicode.github.io/husky/zh/how-to.html#node-版本管理器和-gui ```shell ln -s $(which pnpm) $HOME/.local/bin/pnpm ``` ### .gitattributes 如果你先推送了一个.jpg文件,然后再推送包含.gitattributes文件的更新,Git不会自动重新处理之前的.jpg文件的属性。为使.gitattributes中的新规则生效,你可以通过以下步骤重新应用设置: ```bash 1. 删除本地缓存的.jpg文件:git rm --cached .jpg 2. 重新添加该文件:git add .jpg 3. 再次提交并推送:git commit -m "Apply .gitattributes changes" && git push ``` 这样,Git将按照.gitattributes中的新规则处理该文件。 要验证.gitattributes文件中的二进制配置是否生效,可以使用以下方法: ```bash 1. 推送后验证:先按照之前步骤重新添加并推送.jpg文件。 2. 查看差异(diff):执行 git diff,检查文件是否有文本形式的改动。如果是二进制文件,Git不会显示具体内容的差异。 3. Git日志验证:执行 git log -p .jpg 查看提交的改动记录,确认文件未受行尾或编码处理的影响。 ``` 如果以上测试显示该文件未发生不必要的改动,说明.gitattributes配置已生效。 ## Links - https://github.com/hyoban-template/shadcn-vue-unocss-starter$0 - https://github.com/vitest-dev/vitest-browser-vue/blob/main/tsup.config.ts - [Performance API优化页面性能](https://juejin.cn/post/7238779568478552122) - [vitepress-theme-demoblock](https://www.npmjs.com/package/vitepress-theme-demoblock) - [Vite PWA](https://vite-pwa-org-zh.netlify.app/guide/) --- - https://doc.houdunren.com - https://pengyyyyy.github.io/blog/work/me.html --- - https://biomejs.dev/zh-cn/internals/language-support/ - https://github.dev/antfu-collective/vitesse/ - [Vue3 入门指南与实战案例](https://vue3.chengpeiquan.com/) - [如何建立一个最小重现](https://antfu.me/posts/why-reproductions-are-required-zh#如何建立一个最小重现)