From 313d3bf19ec22c057fba95aea256525384321b3e Mon Sep 17 00:00:00 2001 From: yunji Date: Wed, 17 Apr 2024 11:14:59 +0800 Subject: [PATCH] docs: update tree structure --- CONTRIBUTING.en-US.md | 45 +++++++++++++++++++++++-------------------- CONTRIBUTING.md | 45 +++++++++++++++++++++++-------------------- README.en-US.md | 2 +- 3 files changed, 49 insertions(+), 43 deletions(-) diff --git a/CONTRIBUTING.en-US.md b/CONTRIBUTING.en-US.md index cfe0f3bcb6..7277881fbc 100644 --- a/CONTRIBUTING.en-US.md +++ b/CONTRIBUTING.en-US.md @@ -1,43 +1,49 @@ [简体中文](./CONTRIBUTING.md)|English -👍🎉 Welcome to contribute code to L7! 🎉👍 +🎉 Welcome to contribute code to L7! 🎉 # Contribution Guide -## Source Code +## 1.Source Code ```bash git clone https://github.com/antvis/L7 --depth=1 ``` -## Pre-installation +## 2.Pre-installation -### Install pnpm +### 2.1.Install pnpm Since pnpm workspace is used, [pnpm](https://pnpm.io/installation) needs to be installed first -### Install dependencies +### 2.2.Install dependencies ```bash pnpm install ``` -## Run Project +## 3.Run Project + +```bash +# Run DEMO +pnpm dev +``` + +**Other commands**: -- `pnpm dev` Run DEMO - `pnpm site:dev` Run local website - `pnpm test:unit` Run unit tests - `pnpm test-cover` Run unit tests and view code coverage: - `pnpm test:integration` Run integration tests - `pnpm build` build source code pakages, output to umd, es and lib directory -## Style Guide +## 4.Style Guide [CODE GUIDELINES](./CODE_GUIDELINES.md) -## Submitting Code +## 5.Submitting Code -### Commit Message Format +### 5.1.Commit Message Format You are encouraged to use [angular commit-message-format](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format) to write commit message. In this way, we could have a more trackable history and an automatically generated changelog. @@ -54,17 +60,17 @@ Commit type must be one of the following: Use succinct words to describe what did you do in the commit change. Look at [these files](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit) for more details. -### Submit code changeset +### 5.2.Submit code changeset we use [changesets](https://github.com/changesets/changesets) for fully automated semantic releases. It can automatically create GitHub Releases and automatically associate the release to the corresponding issue. When we complete development, execute changeset and submit the changeset. ```bash pnpm run changeset git add . -git commit -a -m "chore: commit changeset" +git commit -m "chore: commit changeset" ``` -### Pull Request Guide +### 5.3.Pull Request Guide If you are developer of AntV repo and you are willing to contribute, feel free to create a new branch, finish your modification and submit a PR. AntV group will review your work and merge it to master branch. @@ -72,10 +78,7 @@ If you are developer of AntV repo and you are willing to contribute, feel free t # Create a new branch for development. The name of branch should be semantic, avoiding words like 'update' or 'tmp'. We suggest to use feature/xxx, if the modification is about to implement a new feature. $ git checkout -b branch-name -# Run the test after you finish your modification. Add new test cases or change old ones if you feel necessary -$ npm test - -# If your modification pass the tests, congratulations it's time to push your work back to us. Notice that the commit message should be written in the following format. +# Push your work back to us. Notice that the commit message should be written in the following format. $ git add . # git add -u to delete files $ git commit -m "fix: role.use must xxx" $ git push origin branch-name @@ -90,11 +93,11 @@ No one can guarantee how much will be remembered about certain PR after some tim 3. Related Testing: Briefly describe what part of testing is relevant to your modification. 4. User Tips: Notice for scale users. You can skip this part, if the PR is not about update in API or potential compatibility problem. -## Release +## 6.Release ![Release](https://github.com/antvis/L7/assets/26923747/edf6b817-c699-4fbf-8168-0da1cb429031) -### Online automatic version release +### 6.1.Online automatic version release 1. Go to [GitHub Action](https://github.com/antvis/L7/actions/workflows/create-bumb-version-pr.yml) to trigger Create bump version PR Action execution, select the release branch, and trigger Action execution @@ -106,7 +109,7 @@ No one can guarantee how much will be remembered about certain PR after some tim 5. If step 3 fails, a DingTalk message will be notified. Go to GtiHub Action to check the reason for the failure. -### Manual version release +### 6.2.Manual version release 1. Create a local `release` branch 2. If there is no change set to be published, execute the `pnpm run changeset` script to create a change set for this version release, and execute the coomit change set @@ -115,7 +118,7 @@ No one can guarantee how much will be remembered about certain PR after some tim 5. Merge the changes in the `release` branch to the release branch by submitting a PR 6. Go to [GitHub Releases](https://github.com/antvis/L7/releases) to create a Release for this release. After the creation is completed, the new official website will be automatically deployed. -### Pre-release beta/alpha/next release process +### 6.3.Pre-release beta/alpha/next release process Taking the pre-release beta as an example, a new function is added to release the beta version: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6da71f4062..f9333543cf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,43 +1,49 @@ 简体中文 | [English](./CONTRIBUTING.en-US.md) -👍🎉 欢迎向 L7 贡献代码! 🎉👍 +🎉 欢迎向 L7 贡献代码! 🎉 # 代码贡献规范 -## 下载源码 +## 1.下载源码 ```bash git clone https://github.com/antvis/L7 --depth=1 ``` -## 前置依赖安装 +## 2.前置依赖安装 -### 安装 pnpm +### 2.1.安装 pnpm 由于使用了 pnpm workspace,首先需要安装 [pnpm](https://pnpm.io/installation) -### 安装项目依赖 +### 2.2.安装项目依赖 ```bash pnpm install ``` -## 运行项目 +## 3.运行项目 + +```bash +# 运行 DEMO +pnpm dev +``` + +**其它命令**: -- `pnpm dev` 运行 DEMO - `pnpm site:dev` 启动本地官网 - `pnpm test:unit` 运行单元测试 - `pnpm test-cover` 运行单元测试并查看代码覆盖率 - `pnpm test:integration` 运行集成测试 - `pnpm build` 构建源码包, 分别输出 umd, es 和 lib 目录 -## 代码风格 +## 4.代码风格 [CODE GUIDELINES](./CODE_GUIDELINES.md) -## 提交代码 +## 5.提交代码 -### Commit 提交规范 +### 5.1.Commit 提交规范 根据 [angular 规范](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format) 提交 commit,这样 history 看起来更加清晰。 @@ -55,17 +61,17 @@ pnpm install 尽量用一句话清楚的描述这次提交做了什么,查看具体参考[文档](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit)。 -### 提交代码变更集 +### 5.2.提交代码变更集 我们使用了 [changesets](https://github.com/changesets/changesets) 进行全自动的语义化发布,当我们开发完成后执行 changeset 并提交变更集。 ```bash pnpm run changeset git add . -git commit -a -m "chore: commit changeset" +git commit -m "chore: commit changeset" ``` -### 提交 Pull Request +### 5.3.提交 Pull Request 如果你有仓库的开发者权限,而且希望贡献代码,那么你可以创建分支修改代码提交 PR,AntV 开发团队会 review 代码合并到主干。 @@ -73,10 +79,7 @@ git commit -a -m "chore: commit changeset" # 先创建开发分支开发,分支名应该有含义,避免使用 update、tmp 之类的 $ git checkout -b branch-name -# 开发完成后跑下测试是否通过,必要时需要新增或修改测试用例 -$ npm test - -# 测试通过后,提交代码,message 见下面的规范 +# 提交代码,message 见下面的规范 $ git add . # git add -u 删除文件 $ git commit -m "fix: role.use must xxx" @@ -92,11 +95,11 @@ $ git push origin branch-name 3. 框架测试点(可以关联到测试文件,不用详细描述,关键点即可) 4. 关注点(针对用户而言,可以没有,一般是不兼容更新等,需要额外提示) -## 版本发布 +## 6.版本发布 ![Release](https://github.com/antvis/L7/assets/26923747/edf6b817-c699-4fbf-8168-0da1cb429031) -### 线上自动版本发布 +### 6.1.线上自动版本发布 > 详细流程 [版本发布指南](https://www.yuque.com/antv/l7/qqburqndl8g584kw?singleDoc) @@ -110,7 +113,7 @@ $ git push origin branch-name 5. 第 3 步失败,会进行钉钉消息通知,去 GtiHub Action 查看失败原因 -### 手动版本发布 +### 6.2.手动版本发布 1. 创建本地 `release` 分支 2. 若没有要发布的变更集,执行 `pnpm run changeset` 脚本,创建本次版本发布变更集,执行完成 coomit 变更集 @@ -119,7 +122,7 @@ $ git push origin branch-name 5. 将 `release` 分支变更内容,以提交 PR 方式合并到发布分支 6. 去 [GitHub Releases](https://github.com/antvis/L7/releases) 创建本次发布的 Release,创建完成后会自动部署新官网 -### 预发版 beta/alpha/next 发布流程 +### 6.3.预发版 beta/alpha/next 发布流程 以预发 beta 为例,新增加一个功能,发布 beta 版本: diff --git a/README.en-US.md b/README.en-US.md index a8fabe52e3..e8f548a02f 100644 --- a/README.en-US.md +++ b/README.en-US.md @@ -12,7 +12,7 @@ TutorialsAPI documentationExamples • - Contributor + Contributor

![L7 demo](https://gw.alipayobjects.com/mdn/rms_855bab/afts/img/A*S-73QpO8d0YAAAAAAAAAAABkARQnAQ)