From fd12cc0123e54291c00cd2375989eaf2a880f3f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=AF=E7=84=B6?= Date: Thu, 28 Sep 2023 15:05:32 +0800 Subject: [PATCH] docs: add contributing guide --- CONTRIBUTING-zh.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 53 ++++++++++++++++++++++++++++++++++++++++ README.md | 4 ++++ 3 files changed, 117 insertions(+) create mode 100644 CONTRIBUTING-zh.md create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING-zh.md b/CONTRIBUTING-zh.md new file mode 100644 index 000000000..cd0dd8458 --- /dev/null +++ b/CONTRIBUTING-zh.md @@ -0,0 +1,60 @@ +# 贡献指南 + +我们真的很高兴你有兴趣为 qiankun 贡献。在提交您的代码之前,请务必花点时间阅读以下指南: + +### 1. 安装 Node.js 和 pnpm + +前往 下载并安装适合你的操作系统的最新稳定版本。安装 pnpm: + +### 2. 分叉并签出你自己的仓库 + +进入 ,点击“Fork”按钮。然后按照 [GitHub 文档](https://help.github.com/articles/fork-a-repo)进行分叉和克隆。 + +克隆自己的分叉: + +```shell +git clone https://github.com/<你的 Github 用户名>/qiankun +``` + +在克隆仓库后,需要运行 `pnpm install` 以获得所有必要的依赖。 + +```shell +cd qiankun +pnpm install +``` + +此步骤必须连接网络。它需要下载很多依赖。 + +**注意**:每次从主仓库拉取代码后都重新运行 `pnpm install` 有助于确保使用最新的开发依赖。 + +### 3. 更改代码 & 补充/更新测试用例 + +测试代码位于 `__tests__/`,测试框架采用 [vitest](https://vitest.dev/)。 + +### 4. 执行测试 + +提交代码前请确保测试任务通过✅。 + +```shell +pnpm run ci +``` + +### 5. 提交变更 + +qiankun 使用 [conventional commits](https://www.conventionalcommits.org/)。 + +### 6. 执行 changeset (可选) + +如果你的更改包含功能性变更,请执行: + +```shell +pnpm changeset +``` + +qiankun 遵循[语义化版本](https://semver.org/),根据你的变更类型选择相对应的类型: + +- major: 不兼容的API更改 +- minor: 向后兼容的方式添加功能 +- patch: 向后兼容的错误修复 + +### 7. 提交 pull request diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..66af11b99 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,53 @@ +# Contribution Guide + +We're truly delighted that you're interested in contributing to qiankun. Before submitting your code, please take some time to read through the following guidelines: + +## 1. Install Node.js and pnpm + +Visit [nodejs.org](https://nodejs.org/) to download and install the latest stable version suitable for your operating system. Install pnpm: [pnpm.io/installation](https://pnpm.io/installation) + +## 2. Fork and check out your own repository + +Go to [github.com/umjs/qiankun](https://github.com/umjs/qiankun), click the “Fork” button. Then follow the [GitHub documentation](https://help.github.com/articles/fork-a-repo) to fork and clone. + +Clone your own fork: + +```shell +git clone https://github.com//qiankun +``` + +This step requires an internet connection as it will download many dependencies. + +**Note**: Every time you pull the code from the main repository, re-running `pnpm install` helps ensure you are using the latest development dependencies. + +## 3. Modify the code & supplement/update test cases + +Test code is located in `__tests__/`, and the testing framework used is [vitest](https://vitest.dev/). + +## 4. Execute tests + +Before submitting your code, make sure the test tasks pass✅. + +```shell +pnpm run ci +``` + +## 5. Commit changes + +qiankun uses [conventional commits](https://www.conventionalcommits.org/). + +## 6. Execute changeset (optional) + +If your changes include functional changes, please run: + +```shell +pnpm changeset +``` + +qiankun adheres to [semantic versioning](https://semver.org/). Choose the type corresponding to your changes: + +- major: Incompatible API changes +- minor: Add features in a backward-compatible manner +- patch: Backward-compatible bug fixes + +## 7. Submit pull request diff --git a/README.md b/README.md index 0ec411b21..a4fbee053 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,10 @@ Visit `http://localhost:7099`. See [Qiankun 3.0 Roadmap](https://github.com/umijs/qiankun/discussions/1378) +## 🤝 Contributing + +See [contributing guide](./CONTRIBUTING.md). + ## 👥 Contributors Thanks to all the contributors!