-
Notifications
You must be signed in to change notification settings - Fork 124
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
0 parents
commit 35af33b
Showing
616 changed files
with
24,406 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,16 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab |
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,8 @@ | ||
es/** | ||
demo/es/** | ||
plugin/** | ||
src/.umi/** | ||
src/.umi-production/** | ||
dist/** | ||
docs-dist/** | ||
node_modules |
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,25 @@ | ||
{ | ||
"env": { | ||
"node": true | ||
}, | ||
"globals": { | ||
"my": true, | ||
"App": true, | ||
"Component": true, | ||
"Page": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"rules": { | ||
"no-console": "warn", | ||
"@typescript-eslint/no-var-requires": "warn", | ||
"@typescript-eslint/no-empty-function": "warn" | ||
} | ||
} |
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,47 @@ | ||
--- | ||
name: Bug Report | ||
about: Bug Report | ||
--- | ||
|
||
<!-- | ||
在提交 bug 之前,请参考以下问题排查方式,或许对你会有所帮助: | ||
👉 查看你的 package.json 中是否使用最新版本的 antd-mini,且已正确安装; | ||
👉 根据小程序开发者工具 https://opendocs.alipay.com/mini/ide 的报错提示排查; | ||
👉 详细阅读过组件库文档; | ||
👉 是否遇到自定义组件常见问题 https://opendocs.alipay.com/mini/framework/auge4r 中所提到的问题; | ||
--> | ||
|
||
## 组件 | ||
<!-- 产生 BUG 的组件 --> | ||
|
||
## 基础库版本 | ||
|
||
<!-- 可以通过 my.SDKVersion 获取基础库版本 --> | ||
|
||
- [ ] 1.x | ||
- [ ] 2.x | ||
|
||
## 设备机型 | ||
|
||
## 手机系统 | ||
|
||
- [ ] iOS | ||
- [ ] Android | ||
- [ ] HarmonyOS | ||
|
||
## APP | ||
<!-- 默认为支付宝,如果非支付宝小程序,请填写运行该小程序的 APP --> | ||
|
||
## 组件库版本 | ||
<!-- 产生 BUG 的组件库版本 --> | ||
|
||
## 预期行为 | ||
<!-- 组件正常情况下的行为描述 --> | ||
|
||
## 复现步骤 | ||
<!-- 请提供复现方法,条件运行情况下请提供最小化 demo 示例 --> | ||
1. | ||
2. | ||
|
||
## 复现 demo | ||
<!-- 请上传最小复现 demo --> |
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,17 @@ | ||
--- | ||
name: 功能优化需求 | ||
about: 期望组件增强的功能需求 | ||
labels: enhancement | ||
|
||
--- | ||
|
||
## 背景 | ||
<!-- 请描述你所遇到的问题现状 --> | ||
|
||
|
||
## 期望 | ||
<!-- 请描述你所希望添加的功能 --> | ||
|
||
|
||
## 思路 | ||
<!-- 对于你所描述的问题,是否已有解决方案或者思路,如有可提供作为参考,或者提交你的 PR 、截图 --> |
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,32 @@ | ||
--- | ||
toc: false | ||
--- | ||
|
||
## 参与 antd-mini 建设 | ||
|
||
antd-mini 的发展离不开社区的每一位用户,这里有一些信息可以帮助你参与共建。 | ||
|
||
### 项目运作流程 | ||
|
||
### issue | ||
|
||
如果你有组件库的相关使用问题或需求,可以前往 issue 区域搜索或者提问。我们提供了多种 issue 模板,请根据需要选择对应模板。同时,也非常欢迎你为其他同学解惑。 | ||
|
||
#### feature request | ||
|
||
如果现有的组件不能满足你的开发需求,请提交 issue 来描述你的需求。当然,并不是每一个 FR 都会实现。因为 antd-mini 的定位是一个基础组件库,而非业务组件库。我们会讨论每一个 FR,确认是一个基础组件需求后,我们就会进入开发流程。 | ||
|
||
#### bug | ||
|
||
提交 issue 时,请尽可能多地提供 bug 相关信息,以帮助我们更快地复现并解决。 | ||
|
||
下面是一些注意事项: | ||
|
||
- 设备信息、客户端版本、组件库版本、组件等 | ||
- 你期望的组件行为是什么,实际上组件的行为是什么 | ||
- 详细描述复习步骤 | ||
- 尽可能提供能够复现 demo 以方便我们快速定位问题 | ||
|
||
### 贡献代码 | ||
|
||
非常欢迎各位为 antd-mini 贡献代码,这里有一份[贡献指南](https://github.com/ant-design/ant-design-mini/blob/main/docs/guide/contribute.md)。在贡献代码之前,请提交 RFC issue 并详细描述你的改动,以便我们能够在 RFC 中充分讨论,节省双方的时间。 |
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,37 @@ | ||
--- | ||
name: Pull Request | ||
about: Pull Request | ||
--- | ||
|
||
## 概要 | ||
|
||
<!-- 告诉 CR 者为什么要改?(如:Issue 地址、需求概述、需求链接) --> | ||
<!-- 如果改动过于复杂,需要贴出改动的思路 --> | ||
|
||
## 变更范围 | ||
|
||
- [ ] demo/** | ||
- [ ] src/** | ||
|
||
## 变更类型 | ||
|
||
- [ ] Bug | ||
- [ ] Docs | ||
- [ ] Feature | ||
- [ ] Performance | ||
- [ ] Refactor | ||
- [ ] 其他: 请补充 | ||
|
||
## 自查清单 | ||
|
||
- [ ] 更新/添加 相关文档 | ||
- [ ] 更新/添加 demo 以展示新特性 | ||
|
||
|
||
## 改动前 / 后 (可选) | ||
|
||
<!-- 如果可以通过「日志」或「snapshot」表达前后变化的,请补充 --> | ||
|
||
- 改动前: | ||
|
||
- 改动后: |
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,28 @@ | ||
name: pull_request ci | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 14.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
- name: build | ||
run: | | ||
npm i | ||
npm run build | ||
- name: Save PR number | ||
if: ${{ always() }} | ||
run: echo ${{ github.event.number }} > ./pr-id.txt | ||
|
||
- name: Upload PR number | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: pr | ||
path: ./pr-id.txt |
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,31 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/npm-debug.log* | ||
/yarn-error.log | ||
/yarn.lock | ||
/package-lock.json | ||
|
||
# production | ||
/es | ||
/docs-dist | ||
/dist | ||
/demo/es | ||
|
||
# misc | ||
.DS_Store | ||
/coverage | ||
|
||
# umi | ||
.umi | ||
.umi-production | ||
.umi-test | ||
.env.local | ||
|
||
# ide | ||
/.vscode | ||
/.idea | ||
|
||
# other | ||
/.mini-ide |
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 @@ | ||
{ "plugins": ["./scripts/umi.js"] } |
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,7 @@ | ||
**/*.svg | ||
**/*.ejs | ||
**/*.html | ||
package.json | ||
.umi | ||
.umi-production | ||
.umi-test |
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,15 @@ | ||
{ | ||
"overrides": [ | ||
{ | ||
"files": "*.axml", | ||
"options": { | ||
"parser": "html", | ||
"printWidth": 40, | ||
"tabWidth": 2, | ||
"useTabs":true, | ||
"bracketSameLine":true, | ||
"bracketSpacing":true | ||
} | ||
} | ||
] | ||
} |
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,35 @@ | ||
{ | ||
"extends": "stylelint-config-standard", | ||
"rules": { | ||
at-rule-empty-line-before: null, | ||
at-rule-name-space-after: null, | ||
at-rule-no-unknown: null, | ||
comment-empty-line-before: null, | ||
declaration-bang-space-before: null, | ||
declaration-empty-line-before: null, | ||
function-comma-newline-after: null, | ||
function-name-case: null, | ||
function-parentheses-newline-inside: null, | ||
function-max-empty-lines: null, | ||
function-whitespace-after: null, | ||
indentation: null, | ||
number-leading-zero: null, | ||
number-no-trailing-zeros: null, | ||
rule-empty-line-before: null, | ||
selector-combinator-space-after: null, | ||
selector-list-comma-newline-after: null, | ||
selector-pseudo-element-colon-notation: null, | ||
unit-no-unknown: null, | ||
value-list-max-empty-lines: null, | ||
unit-case: null, | ||
color-hex-case: null, | ||
"selector-type-no-unknown": [ | ||
true, | ||
{ | ||
"ignoreTypes": [ | ||
"page" | ||
] | ||
} | ||
], | ||
} | ||
} |
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,66 @@ | ||
### 代码克隆 | ||
|
||
``` bash | ||
git clone git@github.com:ant-design/ant-design-mini.git | ||
``` | ||
|
||
### 目录结构 | ||
|
||
首先,初步了解目录结构的组成 | ||
|
||
``` bash | ||
├── CHANGELOG.md # 更新日志 | ||
├── demo # 示例小程序 | ||
│ ├── app.acss | ||
│ ├── app.js | ||
│ ├── app.json | ||
│ ├── mini.project.json | ||
│ ├── package.json | ||
│ └── pages | ||
│ ├── Avatar | ||
│ ├── Badge | ||
│ └── ... | ||
├── src # 组件源码 | ||
│ ├── Avatar | ||
│ │ ├── index.axml # 组件 axml 文件 | ||
│ │ ├── index.json # 组件 json 文件 | ||
│ │ ├── index.less # 组件 less 文件 | ||
│ │ ├── index.ts # 组件 ts 文件 | ||
│ │ └── index.md # 组件文档 | ||
│ ├── Badge | ||
│ │ └── ... | ||
│ └── ... | ||
└── tsconfig.json | ||
``` | ||
|
||
### 投入开发 | ||
|
||
*** Tip:请遵循 git flow,正式开发时,新建 feat/xxx 或 fix/xxx 分支进行开发。 *** | ||
|
||
``` bash | ||
// 安装依赖 | ||
npm i | ||
|
||
// 开发环境 | ||
npm run dev | ||
``` | ||
|
||
### 效果预览 | ||
|
||
1. antd-mini 组件使用 [minidev](https://www.npmjs.com/package/minidev/v/0.0.7) 开发,可以通过编写、预览 demo 小程序来验证 src 目录下组件源码是否符合预期; | ||
|
||
2. antd-mini 文档使用 [umi](https://umijs.org/zh-CN) 开发,可在代码开发的同时修改文档,并嵌入编写的 demo; | ||
|
||
|
||
### Commit 规范 | ||
|
||
开发过程中,提交 commit 时,需要遵循以下原则: | ||
|
||
1. 最小化代码变更:保证每个 commit 的逻辑独立、原子化。一个 commit 只做一件事,哪怕这件事只改了 1 行代码,你也应该独立 commit 这次变更; | ||
|
||
2. 遵循 Conventional Commits 原则:避免没有意义、看不懂的 Commit Message 引入,一般情况下,你会大量的使用到: | ||
a. 使用 feat(scope): xxx 来描述一个 feature 的 commit; | ||
b. 使用 fix(scope): xxx 来描述一个 bug fixes 的 commit; | ||
c. 使用 chore(scope): xxx 来来描述一个无关 feature 和 bug fixes 的小调整; | ||
|
||
3. issue:如果改动与 issue 相关,请在 Commit Message 中带上 issue 参数,如:fix(scope): [#1] xxxxxx; |
Oops, something went wrong.