1 Star 0 Fork 0

YFang / keep-alive-4

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Vue3 + View UI Demo

前端代码规范化约束配置的演示Demo,本Demo基于Vue3 + View UI实现。其中前端代码规范采用Eslint + Prettier配合vscode 的配置实现代码格式化和校验。在使用 git 提交时,同样进行了代码校验和格式化,并配置了git 提交模板,统一提交风格。

代码规范

  • Eslint
  • Prettier
  • Vscode settings.json

Git规范

采用 git hooks 实现

1、pre-commit

使用 nano-staged 在代码暂存之前进行代码校验和格式化处理;

2、commit-msg

对代码提交进行统一格式设定。具体详见Commit message 和 Change log 编写指南

实现的工具有:

  • @commitlint/config-conventional @commitlint/cli
  • commitizen cz-conventional-changelog-zh conventional-changelog-cli
  • cz-customizable

参考可点击前端工程化-husky+commitizen+ 自定义cz-customizable适配器 git 提交代码规范化

在使用git cz 或者 git commit 时会对输入格式进行约束。

git commit -m "feat: xxxx"

git cz 采用交互式进行commit设置,且不能使用git commit,应该用git cz 代替 git commit 命令;

MIT License Copyright (c) 2022 YFang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

vue3 + router4 实现keep-alive页面缓存效果 展开 收起
JavaScript 等 5 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/yfang-sz/keep-alive-4.git
git@gitee.com:yfang-sz/keep-alive-4.git
yfang-sz
keep-alive-4
keep-alive-4
master

搜索帮助