-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1b3eec
commit 77ebc8b
Showing
3 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# 贡献指南 | ||
|
||
我们真的很高兴你有兴趣为 qiankun 贡献。在提交您的代码之前,请务必花点时间阅读以下指南: | ||
|
||
### 1. 安装 Node.js 和 pnpm | ||
|
||
前往 <https://nodejs.org/> 下载并安装适合你的操作系统的最新稳定版本。安装 pnpm: <https://pnpm.io/installation> | ||
|
||
### 2. 分叉并签出你自己的仓库 | ||
|
||
进入 <https://github.com/umjs/qiankun>,点击“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/)。 | ||
|
||
### 5. 执行 changeset (可选) | ||
|
||
如果你的更改包含功能性变更,请执行: | ||
|
||
```shell | ||
pnpm changeset | ||
``` | ||
|
||
qiankun 遵循[语义化版本](https://semver.org/),根据你的变更类型选择相对应的类型: | ||
|
||
- major: 不兼容的API更改 | ||
- minor: 向后兼容的方式添加功能 | ||
- patch: 向后兼容的错误修复 | ||
|
||
### 6. 提交 pull request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/<Your Github Username>/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/). | ||
|
||
## 5. 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 | ||
|
||
## 6. Submit pull request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters