qh-cmps
v0.0.2
Published
<!-- * @Author: xujialiang * @Date: 2024-07-05 13:48:10 * @LastEditors: xujialiang * @LastEditTime: 2024-08-20 13:52:47 * @Description: file content --> # qh-cmp
Downloads
61
Readme
qh-cmp
Project setup
npm install
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
Lints and fixes files
npm run lint
Git Commit 提交
本地提交代码,使用 yarn commit
替代 git commit
如果不是,每次提交 commit message 都必须按照以下格式提交,且不得超过 72 个字符(避免自动换行影响美观)
<type
>(<scope>): <subject></subject></scope
></type>
type
用来说明 commit 的类别,例如
- feat:新功能(feature)
- fix:修补 bug
- docs:文档(documentation)
- style: 代码风格,格式修复
- refactor:重构(即不是新增功能,也不是修改 bug 的代码变动)
- perf:代码优化,改善性能
- test:增加测试
- chore:构建过程或辅助工具的变动
- revert:代码回退
- ci:对 CI 配置文件和脚本的更改
- build:变更项目构建或外部依赖
如果 type
是 feat
或 fix
,则该 commit 必须要在记录 changelog(更新日志)中
scope
用于说明 commit 影响的范围,比如数据层、控制层、视图层等等,一般情况下可以不写,如需要可以注明
subject
是 commit 目的的简短描述,不得超过 50 个字符
- 尽量使用英文书写,不会的单词先翻译
- 以动词开头,使用第一人称现在时,比如 change,而不是 changed 或 changes
- 第一个字母小写
- 结尾不加句号(.)
分支检出
组件库的开发主分支为 develop
分支,组件库开发者需要贡献代码时,请按照 Git Commit 提交规范的 type 类型来命名新分支,并进行开发。
例如,需要进行 Button 组件的开发时,拉取 develop
分支最新代码,并生成名为 feat-button
的新分支进行开发。同理,进行 bug 修补时新建分支名应为 fix-button
。
请严格按照以上命名规范进行,不合格的命名分支将会被移除。
在新建分支开发完成之后,需要进行代码审核,审核完成之后才可以合并到 develop
分支,同时,该新建分支名必须删除。
发起 PR 合并
在 push
之前,避免合并冲突,先合并远程的 develop
分支在推送,然后再发起合并,审查完代码后会合并你的代码到 develop
分支
git fetch upstream
git merge upstream/develop
git push origin xxx-button