docs: ✏️ 增加贡献指南及讨论区的链接 (#13)

* docs: ✏️  文档增加讨论区的链接

* docs: ✏️  增加贡献指南

---------

Co-authored-by: xuqingkai <xuqingkai@hd123.com>
This commit is contained in:
weisheng 2023-08-27 17:44:13 +08:00 committed by GitHub
parent a49e22c370
commit 93825151cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 233 additions and 2 deletions

202
.github/CONTRIBUTING.md vendored Normal file
View File

@ -0,0 +1,202 @@
# 贡献指南
### 介绍
感谢你使用 Wot Design Uni。
以下是关于向 Wot Design Uni 提交反馈或代码的指南。在向 Wot Design Uni 提交 issue 或者 PR 之前,请先花几分钟时间阅读以下内容。
### Issue 规范
- 遇到问题时,请先确认这个问题是否已经在 issue 中有记录或者已被修复。
- 提 issue 时,请用简短的语言描述遇到的问题,并添加出现问题时的环境和复现步骤。
## 参与开发
- 请先 [fork](https://help.github.com/cn/github/getting-started-with-github/fork-a-repo) 一份组件库源码到自己的 github。
- 使用 `git clone` 将自己 github 上 fork 得到的源码同步到到你的本地
- 请确保基于 `master` 分支进行开发,我们只接受此分支上的代码贡献。
### 镜像仓库
如果 GitHub 克隆速度较慢,你也可以直接克隆 Wot Design Uni 在 gitee 上的[镜像仓库](https://gitee.com/fant-mini/wot-design-uni)
```bash
git clone https://gitee.com/fant-mini/wot-design-uni.git
```
镜像仓库仅用于加快国内的访问速度,请勿在镜像仓库中提 issue 和 Pull Request。
### 代码规范
在编写代码时,请注意:
- 确保代码可以通过仓库的 `ESLint` 校验。
- 确保代码格式是规范的,使用 `prettier` 进行代码格式化。
## Commit
开发之后,在 commit 代码时commit message 请遵循以下格式:
> 如不按照此以下格式,`git commit` 可能无法正常工作。
```
<Commit 类型>(Commit 修改项): <commit 描述>
// 或者
<Commit 类型>: <commit 描述>
```
例如:
```shell script
npm run commit
# 或者
yarn commit
## 执行命令后根据修改类型选择
```
### commit 类型
```json
[
{
"type": "feat",
"section": "✨ Features | 新功能",
"hidden": false
},
{
"type": "fix",
"section": "🐛 Bug Fixes | Bug 修复",
"hidden": false
},
{
"type": "init",
"section": "🎉 Init | 初始化",
"hidden": true
},
{
"type": "docs",
"section": "✏️ Documentation | 文档",
"hidden": false
},
{
"type": "style",
"section": "💄 Styles | 风格",
"hidden": true
},
{
"type": "refactor",
"section": "♻️ Code Refactoring | 代码重构",
"hidden": true
},
{
"type": "perf",
"section": "⚡ Performance Improvements | 性能优化",
"hidden": true
},
{
"type": "test",
"section": "✅ Tests | 测试",
"hidden": true
},
{
"type": "revert",
"section": "⏪ Revert | 回退",
"hidden": true
},
{
"type": "build",
"section": "📦‍ Build System | 打包构建",
"hidden": true
},
{
"type": "chore",
"section": "🚀 Chore | 构建/工程依赖/工具",
"hidden": true
},
{
"type": "ci",
"section": "👷 Continuous Integration | CI 配置",
"hidden": true
}
]
```
### commit 描述
commit 描述说明了我们本次提交的具体描述,具体内容视情况而定,无固定规范。
## 提交 Pull Request
### 参考指南
如果你是第一次在 GitHub 上提 Pull Request ,可以阅读下面这两篇文章来学习:
- [第一次参与开源](https://github.com/firstcontributions/first-contributions/blob/main/translations/README.zh-cn.md)
- [如何优雅地在 GitHub 上贡献代码](https://segmentfault.com/a/1190000000736629)
### Pull Request 规范
在提交 Pull Request 时,请注意:
- 保持你的 PR 足够小,一个 PR 只解决单个问题或添加单个功能。
- 当新增组件或者修改原有组件时记得增加或者修改对应的文档、Usage和暗黑模式样式。
- 在 PR 中请添加合适的描述,并关联相关的 Issue。
### Pull Request 流程
1. fork 主仓库,如果已经 fork 过,请同步主仓库的最新代码。
2. 基于 fork 后仓库的 master 分支新建一个分支,比如 `feature/add_button`
3. 在新分支上进行开发,开发完成后,提 Pull Request 到主仓库的 main 分支。
4. Pull Request 会在 Review 通过后被合并到主仓库。
5. 等待组件库发布新版本。
### Pull Request 标题格式
Pull Request 的标题应该遵循以下格式:
```bash
typecommit message
```
示例:
- docs: fix typo in quickstart
- build: optimize build speed
- fix: incorrect style
- feat: add color prop
可选的类型:
- fix
- feat
- docs
- perf
- test
- types
- style
- build
- chore
- release
- refactor
- breaking change
- revert
### 同步最新代码
提 Pull Request 前,请依照下面的流程同步主仓库的最新代码:
```bash
# 添加主仓库到 remote
git remote add upstream https://github.com/Moonofweisheng/wot-design-uni.git
# 拉取主仓库最新代码
git fetch upstream
# 切换至 master 分支
git checkout master
# 合并主仓库代码
git merge upstream/master
```

View File

@ -60,6 +60,20 @@
详细说明见 [快速上手](https://wot-design-uni.netlify.app/guide/quickUse.html)
## 链接
* [意见反馈](https://github.com/Moonofweisheng/wot-design-uni/issues)
* [更新日志](https://wot-design-uni.netlify.app/guide/changelog.html)
* [常见问题](https://wot-design-uni.netlify.app/guide/commonProblems.html)
* [Discussions 讨论区](https://github.com/Moonofweisheng/wot-design-uni/discussions)
## 贡献指南
修改代码请阅读我们的 [贡献指南](https://github.com/Moonofweisheng/wot-design-uni/blob/develop/.github/CONTRIBUTING.md)。
使用过程中发现任何问题都可以提 [Issue](https://github.com/Moonofweisheng/wot-design-uni/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/Moonofweisheng/wot-design-uni/pulls)。
## 贡献者们
感谢以下所有给 Wot Design Uni 贡献过代码的 [开发者](https://github.com/Moonofweisheng/wot-design-uni/graphs/contributors)。
@ -71,7 +85,7 @@
## 捐赠本项目
捐赠本项目,支持组件库的更好的发展,捐赠后你的头像、昵称和主页将会被展示在 `wot design uni` 文档的捐赠榜单上。
捐赠本项目,支持组件库的更好的发展,捐赠后你的昵称和主页将会被展示在 `wot design uni` 文档的捐赠榜单上。
### 爱发电捐赠

View File

@ -35,6 +35,7 @@
* [意见反馈](https://github.com/Moonofweisheng/wot-design-uni/issues)
* [更新日志](/guide/changelog)
* [常见问题](/guide/commonProblems)
* [Discussions 讨论区](https://github.com/Moonofweisheng/wot-design-uni/discussions)
## 开源协议

View File

@ -60,6 +60,20 @@
详细说明见 [快速上手](https://wot-design-uni.netlify.app/guide/quickUse.html)
## 链接
* [意见反馈](https://github.com/Moonofweisheng/wot-design-uni/issues)
* [更新日志](https://wot-design-uni.netlify.app/guide/changelog.html)
* [常见问题](https://wot-design-uni.netlify.app/guide/commonProblems.html)
* [Discussions 讨论区](https://github.com/Moonofweisheng/wot-design-uni/discussions)
## 贡献指南
修改代码请阅读我们的 [贡献指南](https://github.com/Moonofweisheng/wot-design-uni/blob/develop/.github/CONTRIBUTING.md)。
使用过程中发现任何问题都可以提 [Issue](https://github.com/Moonofweisheng/wot-design-uni/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/Moonofweisheng/wot-design-uni/pulls)。
## 贡献者们
感谢以下所有给 Wot Design Uni 贡献过代码的 [开发者](https://github.com/Moonofweisheng/wot-design-uni/graphs/contributors)。
@ -71,7 +85,7 @@
## 捐赠本项目
捐赠本项目,支持组件库的更好的发展,捐赠后你的头像、昵称和主页将会被展示在 `wot design uni` 文档的捐赠榜单上。
捐赠本项目,支持组件库的更好的发展,捐赠后你的昵称和主页将会被展示在 `wot design uni` 文档的捐赠榜单上。
### 爱发电捐赠