Skip to content

Commit 6480d49

Browse files
authoredJan 26, 2018
doc: move back some md file (NG-ZORRO#972)
1 parent fd99ab1 commit 6480d49

8 files changed

+573
-115
lines changed
 

‎.editorconfig

+47-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,48 @@
1-
# Editor configuration, see http://editorconfig.org
2-
root = true
3-
41
[*]
5-
charset = utf-8
6-
indent_style = space
7-
indent_size = 2
8-
insert_final_newline = true
9-
trim_trailing_whitespace = true
10-
11-
[*.md]
12-
max_line_length = off
13-
trim_trailing_whitespace = false
2+
charset=utf-8
3+
end_of_line=lf
4+
trim_trailing_whitespace=true
5+
insert_final_newline=false
6+
indent_style=space
7+
indent_size=4
8+
9+
[{*.ng,*.sht,*.html,*.shtm,*.shtml,*.htm}]
10+
indent_style=space
11+
indent_size=2
12+
13+
[{.babelrc,.stylelintrc,.eslintrc,jest.config,*.json,*.jsb3,*.jsb2,*.bowerrc}]
14+
indent_style=space
15+
indent_size=2
16+
17+
[*.css]
18+
indent_style=space
19+
indent_size=2
20+
21+
[{*.applejs,*.js}]
22+
indent_style=space
23+
indent_size=2
24+
25+
[{*.ats,*.ts}]
26+
indent_style=space
27+
indent_size=2
28+
29+
[*.tsx]
30+
indent_style=space
31+
indent_size=2
32+
33+
[*.js.map]
34+
indent_style=space
35+
indent_size=2
36+
37+
[*.less]
38+
indent_style=space
39+
indent_size=2
40+
41+
[{.analysis_options,*.yml,*.yaml}]
42+
indent_style=space
43+
indent_size=2
44+
45+
[tslint.json]
46+
indent_style=space
47+
indent_size=2
48+

‎.github/ISSUE_TEMPLATE.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!--
2+
IMPORTANT: Please use the following link to create a new issue:
3+
4+
http://ng.ant.design/issue-helper/#/new-issue
5+
6+
If your issue was not created using the app above, it will be closed immediately.
7+
-->
8+
9+
<!--
10+
注意:请使用下面的链接来新建 issue:
11+
12+
http://ng.ant.design/issue-helper/#/new-issue
13+
14+
不是用上面的链接创建的 issue 会被立即关闭。
15+
-->

‎.github/PULL_REQUEST_TEMPLATE.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## PR Checklist
2+
Please check if your PR fulfills the following requirements:
3+
4+
- [ ] The commit message follows our guidelines: https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/CONTRIBUTING.md#commit
5+
- [ ] Tests for the changes have been added (for bug fixes / features)
6+
- [ ] Docs have been added / updated (for bug fixes / features)
7+
8+
9+
## PR Type
10+
What kind of change does this PR introduce?
11+
12+
<!-- Please check the one that applies to this PR using "x". -->
13+
```
14+
[ ] Bugfix
15+
[ ] Feature
16+
[ ] Code style update (formatting, local variables)
17+
[ ] Refactoring (no functional changes, no api changes)
18+
[ ] Build related changes
19+
[ ] CI related changes
20+
[ ] Documentation content changes
21+
[ ] Application (the showcase website) / infrastructure changes
22+
[ ] Other... Please describe:
23+
```
24+
25+
## What is the current behavior?
26+
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
27+
28+
Issue Number: N/A
29+
30+
31+
## What is the new behavior?
32+
33+
34+
## Does this PR introduce a breaking change?
35+
```
36+
[ ] Yes
37+
[ ] No
38+
```
39+
40+
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
41+
42+
43+
## Other information

‎CODE_OF_CONDUCT.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of the NG-ZORRO project, we pledge to respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities.
4+
5+
Communication through any of NG-ZORRO's channels (GitHub, Gitter, IRC, mailing lists, etc.) must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
6+
7+
We promise to extend courtesy and respect to everyone involved in this project regardless of gender, gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of experience. We expect anyone contributing to the NG-ZORRO project to do the same.
8+
9+
If any member of the community violates this code of conduct, the maintainers of the NG-ZORRO project may take action, removing issues, comments, and PRs or blocking accounts as deemed appropriate.
10+
11+
If you are subject to or witness unacceptable behavior, or have any other concerns, please contact us.

‎CONTRIBUTING.md

+239
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
# Contributing to NG-ZORRO
2+
3+
We would love for you to contribute to NG-ZORRO and help make it even better than it is
4+
today! As a contributor, here are the guidelines we would like you to follow:
5+
6+
- [Code of Conduct](#coc)
7+
- [Question or Problem?](#question)
8+
- [Issues and Bugs](#issue)
9+
- [Feature Requests](#feature)
10+
- [Submission Guidelines](#submit)
11+
- [Coding Rules](#rules)
12+
- [Commit Message Guidelines](#commit)
13+
14+
## <a name="coc"></a> Code of Conduct
15+
Help us keep NG-ZORRO open and inclusive. Please read and follow our [Code of Conduct][coc].
16+
17+
## <a name="question"></a> Got a Question or Problem?
18+
19+
Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [Segmentfault](https://segmentfault.com/t/ng-zorro) or [Stack Overflow](https://stackoverflow.com/tags/ng-zorro) where the questions should be tagged with tag `ng-zorro`.
20+
21+
Segmentfault / Stack Overflow is a much better place to ask questions since:
22+
23+
- there are thousands of people willing to help on Segmentfault
24+
- questions and answers stay available for public viewing so your question / answer might help someone else
25+
- Segmentfault's voting system assures that the best answers are prominently visible.
26+
27+
To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Segmentfault / Stack Overflow.
28+
29+
If you would like to chat about the question in real-time, you can reach out via [our gitter channel][gitter].
30+
31+
## <a name="issue"></a> Found a Bug?
32+
If you find a bug in the source code, you can help us by
33+
[submitting an issue](#submit-issue) to our [GitHub Repository][github]. Even better, you can
34+
[submit a Pull Request](#submit-pr) with a fix.
35+
36+
## <a name="feature"></a> Missing a Feature?
37+
You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub
38+
Repository. If you would like to *implement* a new feature, please submit an issue with
39+
a for your work first, to be sure that we can use it.
40+
Please consider what kind of change it is:
41+
42+
* For a **Major Feature**, first open an issue and outline your proposal so that it can be
43+
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
44+
and help you to craft the change so that it is successfully accepted into the project.
45+
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
46+
47+
## <a name="submit"></a> Submission Guidelines
48+
49+
### <a name="submit-issue"></a> Submitting an Issue
50+
51+
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
52+
53+
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a minimal reproduction scenario using http://plnkr.co. Having a live, reproducible scenario gives us wealth of important information without going back & forth to you with additional questions like:
54+
55+
- version of NG-ZORRO used
56+
- 3rd-party libraries and their versions
57+
- and most importantly - a use-case that fails
58+
59+
A minimal reproduce scenario using http://plnkr.co/ allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem. If plunker is not a suitable way to demonstrate the problem (for example for issues related to our npm packaging), please create a standalone git repository demonstrating the problem.
60+
61+
We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal plunk. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
62+
63+
Unfortunately we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced.
64+
65+
You can file new issues by filling out our [new issue form](https://github.com/NG-ZORRO/ng-zorro-antd/issues/new).
66+
67+
68+
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
69+
Before you submit your Pull Request (PR) consider the following guidelines:
70+
71+
* Search [GitHub](https://github.com/NG-ZORRO/ng-zorro-antd/pulls) for an open or closed PR
72+
that relates to your submission. You don't want to duplicate effort.
73+
* Make your changes in a new git branch:
74+
75+
```shell
76+
git checkout -b my-fix-branch master
77+
```
78+
79+
* Create your patch, **including appropriate test cases**.
80+
* Follow our [Coding Rules](#rules).
81+
* Run the full NG-ZORRO test suite <!-- , as described in the [developer documentation][dev-doc] -->, and ensure that all tests pass.
82+
* Commit your changes using a descriptive commit message that follows our
83+
[commit message conventions](#commit). Adherence to these conventions
84+
is necessary because release notes are automatically generated from these messages.
85+
86+
```shell
87+
git commit -a
88+
```
89+
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
90+
91+
* Push your branch to GitHub:
92+
93+
```shell
94+
git push origin my-fix-branch
95+
```
96+
97+
* In GitHub, send a pull request to `ng-zorro-antd:master`.
98+
* If we suggest changes then:
99+
* Make the required updates.
100+
* Re-run the NG-ZORRO test suites to ensure tests are still passing.
101+
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
102+
103+
```shell
104+
git rebase master -i
105+
git push -f
106+
```
107+
108+
That's it! Thank you for your contribution!
109+
110+
#### After your pull request is merged
111+
112+
After your pull request is merged, you can safely delete your branch and pull the changes
113+
from the main (upstream) repository:
114+
115+
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
116+
117+
```shell
118+
git push origin --delete my-fix-branch
119+
```
120+
121+
* Check out the master branch:
122+
123+
```shell
124+
git checkout master -f
125+
```
126+
127+
* Delete the local branch:
128+
129+
```shell
130+
git branch -D my-fix-branch
131+
```
132+
133+
* Update your master with the latest upstream version:
134+
135+
```shell
136+
git pull --ff upstream master
137+
```
138+
139+
## <a name="rules"></a> Coding Rules
140+
To ensure consistency throughout the source code, keep these rules in mind as you are working:
141+
142+
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
143+
* All public API methods **must be documented**.
144+
145+
## <a name="commit"></a> Commit Message Guidelines
146+
147+
We have very precise rules over how our git commit messages can be formatted. This leads to **more
148+
readable messages** that are easy to follow when looking through the **project history**. But also,
149+
we use the git commit messages to **generate the NG-ZORRO change log**.
150+
151+
### Commit Message Format
152+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
153+
format that includes a **type**, a **scope** and a **subject**:
154+
155+
```
156+
<type>(<scope>): <subject>
157+
<BLANK LINE>
158+
<body>
159+
<BLANK LINE>
160+
<footer>
161+
```
162+
163+
The **header** is mandatory and the **scope** of the header is optional.
164+
165+
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
166+
to read on GitHub as well as in various git tools.
167+
168+
Footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
169+
170+
Samples: (even more [samples](https://github.com/NG-ZORRO/ng-zorro-antd/commits/master))
171+
172+
```
173+
docs(changelog): update change log to beta.5
174+
```
175+
```
176+
fix(release): need to depend on latest rxjs and zone.js
177+
178+
The version in our package.json gets copied to the one we publish, and users need the latest of these.
179+
```
180+
181+
### Revert
182+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
183+
184+
### Type
185+
Must be one of the following:
186+
187+
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
188+
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
189+
* **docs**: Documentation only changes
190+
* **feat**: A new feature
191+
* **fix**: A bug fix
192+
* **perf**: A code change that improves performance
193+
* **refactor**: A code change that neither fixes a bug nor adds a feature
194+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
195+
* **test**: Adding missing tests or correcting existing tests
196+
197+
### Scope
198+
The scope should be the name of the module affected (folder name or other meaningful words), and should prefix with *module:* (as perceived by person reading changelog generated from commit messages.
199+
200+
The following are some examples:
201+
202+
* **module:alert**
203+
* **module:badge**
204+
* **module:breadcrumb**
205+
* **module:OTHER_COMPONENT_NAME**
206+
207+
There are currently a few exceptions to the "use module name" rule:
208+
209+
* **packaging**: used for changes that change the npm package layout, e.g. public path changes, package.json changes, d.ts file/format changes, changes to bundles, etc.
210+
* **changelog**: used for updating the release notes in CHANGELOG.md
211+
* **showcase**: used for docs-app (ng.ant.design) related changes within the /showcase directory of the repo
212+
* none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)
213+
214+
### Subject
215+
The subject contains succinct description of the change:
216+
217+
* use the imperative, present tense: "change" not "changed" nor "changes"
218+
* don't capitalize first letter
219+
* no dot (.) at the end
220+
221+
### Body
222+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
223+
The body should include the motivation for the change and contrast this with previous behavior.
224+
225+
### Footer
226+
The footer should contain any information about **Breaking Changes** and is also the place to
227+
reference GitHub issues that this commit **Closes**.
228+
229+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
230+
231+
A detailed explanation can be found in this [document][commit-message-format].
232+
233+
234+
[coc]: https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/CODE_OF_CONDUCT.md
235+
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
236+
[dev-doc]: https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/docs/DEVELOPER.md
237+
[github]: https://github.com/NG-ZORRO/ng-zorro-antd
238+
[gitter]: https://gitter.im/ng-zorro/ng-zorro-antd
239+
[plunker]: http://plnkr.co/edit

‎PROGRESS.md

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# 进度
2+
3+
## 组件
4+
| 组件 | 文档 | 测试 | 功能 | 负责 | 重构 |
5+
| --- | --- | --- | --- | --- | --- |
6+
| button || 100% | 100% | vthinkxie | x |
7+
| icon || - | 100% | vthinkxie | x |
8+
| grid || 100% | 100% | vthinkxie | x |
9+
| layout || 100% | 100% | vthinkxie | x |
10+
| breadcrumb || 100% | 100% | vthinkxie | - |
11+
| dropdown | x | x | x | vthinkxie | - |
12+
| menu | x | x | x | vthinkxie | - |
13+
| pagination | x | x | x | vthinkxie | - |
14+
| steps | x | x | x | vthinkxie | - |
15+
| checkbox | x | x | x | vthinkxie | - |
16+
| form | x | x | x | vthinkxie | - |
17+
| input | x | x | x | vthinkxie | - |
18+
| inputnumber | x | x | x | vthinkxie | - |
19+
| radio | x | x | x | vthinkxie | - |
20+
| rate | x | x | x | vthinkxie | - |
21+
| select | x | x | x | vthinkxie | - |
22+
| switch | x | x | x | vthinkxie | - |
23+
| badge | x | x | x | vthinkxie | - |
24+
| card | x | x | x | vthinkxie | - |
25+
| carousel | x | x | x | vthinkxie | - |
26+
| collapse | x | x | x | vthinkxie | - |
27+
| table | x | x | x | vthinkxie | - |
28+
| tabs | x | x | x | vthinkxie | - |
29+
| timeline | x | x | x | vthinkxie | - |
30+
| alert | x | x | x | vthinkxie | - |
31+
| progress | x | x | x | vthinkxie | - |
32+
| spin | x | x | x | vthinkxie | - |
33+
| popover | x | x | x | wilsoncook | - |
34+
| tooltip | x | x | x | wilsoncook | - |
35+
| popconfirm | x | x | x | wilsoncook | - |
36+
| slider | x | x | x | wilsoncook | - |
37+
| modal | x | x | x | wilsoncook | - |
38+
| message | x | x | x | wilsoncook | - |
39+
| notification | x | x | x | wilsoncook | - |
40+
| datepicker | x | x | x | trotyl | - |
41+
| timepicker | x | x | x | trotyl | - |
42+
| calendar | x | x | x | trotyl | - |
43+
| affix | x | x | x | cipchk | - |
44+
| transfer | x | x | x | cipchk | - |
45+
| avatar | x | x | x | cipchk | - |
46+
| list | x | x | x | cipchk | - |
47+
| upload | x | x | x | cipchk | - |
48+
| anchor | x | x | x | cipchk | - |
49+
| backtop | x | x | x | cipchk | - |
50+
| divider | x | x | x | cipchk | - |
51+
| treeselect | x | x | x | simplejason | - |
52+
| tree | x | x | x | simplejason | - |
53+
| tags | x | x | x | fbchen | -|
54+
| cascader | x | x | x | fbchen | - |
55+
| autocomplete | x | x | x | HsuanXyz | - |
56+
| mention | x | x | x | HsuanXyz | - |
57+
58+
59+
60+
# 初始化
61+
目前文档系统处于基本可用状态,依次执行
62+
* git clone -b 0.7.0 https://github.com/NG-ZORRO/ng-zorro-antd.git ng-zorro-antd-0.7.0
63+
* cd ng-zorro-antd-0.7.0
64+
* npm i
65+
* npm run site:init (初始化文档站点)
66+
* ng serve
67+
即可看到目前的doc及相关组件的开发进度
68+
69+
## 调试
70+
71+
运行 `ng serve` 可以直接修改 `./components` 会立即更新。
72+
73+
> 若修改DEMO代码,需要额外运行一次 `node scripts/generate-site button` 表示重新生成 button 所有DEMO代码。
74+
75+
## 测试代码
76+
77+
运行 `ng test`
78+
79+
**加速度**
80+
81+
默认会执行 `./components` 下所有 `*.spec.ts`,可手动调整 `./components/test.ts` 文件的临时针对某个测试文件,提升测试体验。
82+
83+
# 开发
84+
## 文件夹结构
85+
进入 components 文件夹,每个组件会有一个单独的文件夹,其中包括
86+
* demo 包括每个markdown说明文件.md和demo文件.ts
87+
* doc 包括中英文的介绍markdown
88+
* style 包括组件的样式文件
89+
这三个文件夹,组件的原始代码在根文件夹中
90+
demo、doc 和 style的初始内容可以直接从 antd react 项目中 https://github.com/ant-design/ant-design/tree/master/components/alert 获取,注意需要将index.zh-CN.md 和 index.en-US.md 手动移至 doc目录下
91+
**请注意,需要将antd react同步后的demo文件夹中的md文件中的jsx代码格式手动移除**
92+
## 格式与命名
93+
demo文件夹中的ts文件名称与markdown的名称保持一致,具体可以参照已经完成的组件部分
94+
其中demo的
95+
* selector的命名: nz-demo-${组件名称}-${demo名称}
96+
* component class的命名(驼峰):NzDemo${组件名称}${demo名称}Component
97+
例如alert组件的banner demo的selector为 `nz-demo-alert-banner`,component class为`NzDemoAlertBannerComponent`
98+
## 同步文档
99+
当按以上格式开发完成一个组件后,在ng serve的状态下
100+
运行 `npm run site` 后,会快速同步src文件夹中的内容更新页面内容
101+
# 测试
102+
测试代码与组件代码保持在同一目录,以spec.ts结尾
103+
spec.ts测试文件从demo文件中引入ts文件作为测试的TestBed Component

‎README-zh_CN.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<p align="center">
2+
<a href="http://ng.ant.design">
3+
<img width="230" src="https://img.alicdn.com/tfs/TB1FVMDosrI8KJjy0FhXXbfnpXa-200-200.svg">
4+
</a>
5+
</p>
6+
7+
# NG ZORRO
8+
[![Travis branch](https://img.shields.io/travis/NG-ZORRO/ng-zorro-antd/0.7.0.svg?style=flat-square)]()
9+
[![Coveralls github](https://img.shields.io/coveralls/NG-ZORRO/ng-zorro-antd/0.7.0.svg?style=flat-square)]()
10+
[![Gemnasium](https://img.shields.io/gemnasium/NG-ZORRO/ng-zorro-antd.svg?style=flat-square)](https://gemnasium.com/github.com/NG-ZORRO/ng-zorro-antd)
11+
[![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/ng-zorro-antd)
12+
13+
[![NPM downloads](http://img.shields.io/npm/dm/ng-zorro-antd.svg?style=flat-square)](https://npmjs.org/package/ng-zorro-antd)
14+
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/NG-ZORRO/ng-zorro-antd.svg)](http://isitmaintained.com/project/NG-ZORRO/ng-zorro-antd "Average time to resolve an issue")
15+
[![Gitter](https://img.shields.io/gitter/room/ng-zorro/ng-zorro-antd.svg?style=flat-square)](https://gitter.im/ng-zorro/ng-zorro-antd)
16+
17+
这里是 Ant Design 的 Angular 5.0 实现,开发和服务于企业级后台产品。
18+
19+
[README in English](README.md)
20+
21+
## 特性
22+
23+
- 提炼自企业级中后台产品的交互语言和视觉风格,定期与Ant Design React版本保持更新一致。
24+
- 开箱即用的高质量 Angular 组件。
25+
- 使用 TypeScript 构建,提供完整的类型定义文件。
26+
27+
## 支持环境
28+
29+
* 现代浏览器和 IE9 以上(需要 [polyfills](https://angular.io/guide/browser-support)
30+
31+
## 兼容版本
32+
33+
当前支持Angular`^5.0.0`版本
34+
35+
36+
## 安装
37+
38+
**我们推荐使用 npm 方式进行开发**,不仅可在开发环境轻松调试,也可放心地在生产环境打包部署使用,享受整个生态圈和工具链带来的诸多好处。
39+
40+
```bash
41+
$ npm install ng-zorro-antd --save
42+
```
43+
44+
如果你的网络环境不佳,推荐使用 [cnpm](https://github.com/cnpm/cnpm)
45+
46+
## 标准开发
47+
48+
实际项目开发中,你会需要对 TypeScript 代码的构建、调试、代理、打包部署等一系列工程化的需求。
49+
我们推荐官方的 `@angular/cli` 工具链辅助进行开发
50+
51+
如果你想了解更多CLI工具链的功能和命令,建议访问[Angular CLI](https://github.com/angular/angular-cli)了解更多

‎README.md

+64-103
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,64 @@
1-
# 进度
2-
3-
## 组件
4-
| 组件 | 文档 | 测试 | 功能 | 负责 | 重构 |
5-
| --- | --- | --- | --- | --- | --- |
6-
| button || 100% | 100% | vthinkxie | x |
7-
| icon || - | 100% | vthinkxie | x |
8-
| grid || 100% | 100% | vthinkxie | x |
9-
| layout || 100% | 100% | vthinkxie | x |
10-
| breadcrumb || 100% | 100% | vthinkxie | - |
11-
| dropdown | x | x | x | vthinkxie | - |
12-
| menu | x | x | x | vthinkxie | - |
13-
| pagination | x | x | x | vthinkxie | - |
14-
| steps | x | x | x | vthinkxie | - |
15-
| checkbox | x | x | x | vthinkxie | - |
16-
| form | x | x | x | vthinkxie | - |
17-
| input | x | x | x | vthinkxie | - |
18-
| inputnumber | x | x | x | vthinkxie | - |
19-
| radio | x | x | x | vthinkxie | - |
20-
| rate | x | x | x | vthinkxie | - |
21-
| select | x | x | x | vthinkxie | - |
22-
| switch | x | x | x | vthinkxie | - |
23-
| badge | x | x | x | vthinkxie | - |
24-
| card | x | x | x | vthinkxie | - |
25-
| carousel | x | x | x | vthinkxie | - |
26-
| collapse | x | x | x | vthinkxie | - |
27-
| table | x | x | x | vthinkxie | - |
28-
| tabs | x | x | x | vthinkxie | - |
29-
| timeline | x | x | x | vthinkxie | - |
30-
| alert | x | x | x | vthinkxie | - |
31-
| progress | x | x | x | vthinkxie | - |
32-
| spin | x | x | x | vthinkxie | - |
33-
| popover | x | x | x | wilsoncook | - |
34-
| tooltip | x | x | x | wilsoncook | - |
35-
| popconfirm | x | x | x | wilsoncook | - |
36-
| slider | x | x | x | wilsoncook | - |
37-
| modal | x | x | x | wilsoncook | - |
38-
| message | x | x | x | wilsoncook | - |
39-
| notification | x | x | x | wilsoncook | - |
40-
| datepicker | x | x | x | trotyl | - |
41-
| timepicker | x | x | x | trotyl | - |
42-
| calendar | x | x | x | trotyl | - |
43-
| affix | x | x | x | cipchk | - |
44-
| transfer | x | x | x | cipchk | - |
45-
| avatar | x | x | x | cipchk | - |
46-
| list | x | x | x | cipchk | - |
47-
| upload | x | x | x | cipchk | - |
48-
| anchor | x | x | x | cipchk | - |
49-
| backtop | x | x | x | cipchk | - |
50-
| divider | x | x | x | cipchk | - |
51-
| treeselect | x | x | x | simplejason | - |
52-
| tree | x | x | x | simplejason | - |
53-
| tags | x | x | x | fbchen | -|
54-
| cascader | x | x | x | fbchen | - |
55-
| autocomplete | x | x | x | HsuanXyz | - |
56-
| mention | x | x | x | HsuanXyz | - |
57-
58-
59-
60-
# 初始化
61-
目前文档系统处于基本可用状态,依次执行
62-
* git clone -b 0.7.0 https://github.com/NG-ZORRO/ng-zorro-antd.git ng-zorro-antd-0.7.0
63-
* cd ng-zorro-antd-0.7.0
64-
* npm i
65-
* npm run site:init (初始化文档站点)
66-
* ng serve
67-
即可看到目前的doc及相关组件的开发进度
68-
69-
## 调试
70-
71-
运行 `ng serve` 可以直接修改 `./components` 会立即更新。
72-
73-
> 若修改DEMO代码,需要额外运行一次 `node scripts/generate-site button` 表示重新生成 button 所有DEMO代码。
74-
75-
## 测试代码
76-
77-
运行 `ng test`
78-
79-
**加速度**
80-
81-
默认会执行 `./components` 下所有 `*.spec.ts`,可手动调整 `./components/test.ts` 文件的临时针对某个测试文件,提升测试体验。
82-
83-
# 开发
84-
## 文件夹结构
85-
进入 components 文件夹,每个组件会有一个单独的文件夹,其中包括
86-
* demo 包括每个markdown说明文件.md和demo文件.ts
87-
* doc 包括中英文的介绍markdown
88-
* style 包括组件的样式文件
89-
这三个文件夹,组件的原始代码在根文件夹中
90-
demo、doc 和 style的初始内容可以直接从 antd react 项目中 https://github.com/ant-design/ant-design/tree/master/components/alert 获取,注意需要将index.zh-CN.md 和 index.en-US.md 手动移至 doc目录下
91-
**请注意,需要将antd react同步后的demo文件夹中的md文件中的jsx代码格式手动移除**
92-
## 格式与命名
93-
demo文件夹中的ts文件名称与markdown的名称保持一致,具体可以参照已经完成的组件部分
94-
其中demo的
95-
* selector的命名: nz-demo-${组件名称}-${demo名称}
96-
* component class的命名(驼峰):NzDemo${组件名称}${demo名称}Component
97-
例如alert组件的banner demo的selector为 `nz-demo-alert-banner`,component class为`NzDemoAlertBannerComponent`
98-
## 同步文档
99-
当按以上格式开发完成一个组件后,在ng serve的状态下
100-
运行 `npm run site` 后,会快速同步src文件夹中的内容更新页面内容
101-
# 测试
102-
测试代码与组件代码保持在同一目录,以spec.ts结尾
103-
spec.ts测试文件从demo文件中引入ts文件作为测试的TestBed Component
1+
<p align="center">
2+
<a href="http://ng.ant.design">
3+
<img width="230" src="https://img.alicdn.com/tfs/TB1FVMDosrI8KJjy0FhXXbfnpXa-200-200.svg">
4+
</a>
5+
</p>
6+
7+
# NG ZORRO
8+
[![Travis branch](https://img.shields.io/travis/NG-ZORRO/ng-zorro-antd/0.7.0.svg?style=flat-square)]()
9+
[![Coveralls github](https://img.shields.io/coveralls/NG-ZORRO/ng-zorro-antd/0.7.0.svg?style=flat-square)]()
10+
[![Gemnasium](https://img.shields.io/gemnasium/NG-ZORRO/ng-zorro-antd.svg?style=flat-square)](https://gemnasium.com/github.com/NG-ZORRO/ng-zorro-antd)
11+
[![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/ng-zorro-antd)
12+
13+
[![NPM downloads](http://img.shields.io/npm/dm/ng-zorro-antd.svg?style=flat-square)](https://npmjs.org/package/ng-zorro-antd)
14+
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/NG-ZORRO/ng-zorro-antd.svg)](http://isitmaintained.com/project/NG-ZORRO/ng-zorro-antd "Average time to resolve an issue")
15+
[![Gitter](https://img.shields.io/gitter/room/ng-zorro/ng-zorro-antd.svg?style=flat-square)](https://gitter.im/ng-zorro/ng-zorro-antd)
16+
17+
An enterprise-class UI components based on Ant Design and Angular.
18+
19+
[中文 README](README-zh_CN.md)
20+
21+
22+
## Features
23+
24+
- An enterprise-class UI design language for web applications.
25+
- A set of high-quality Angular components out of the box.
26+
- Written in TypeScript with complete define types.
27+
28+
## Environment Support
29+
30+
* Modern browsers and Internet Explorer 9+(with [polyfills](https://angular.io/guide/browser-support))。
31+
32+
## Angular Version Support
33+
34+
* Angular`^5.0.0`
35+
36+
37+
## Install
38+
39+
```bash
40+
$ npm install ng-zorro-antd --save
41+
```
42+
43+
## Development
44+
45+
```bash
46+
$ git clone git@github.com:NG-ZORRO/ng-zorro-antd.git
47+
$ npm install
48+
$ npm start
49+
```
50+
51+
52+
## Links
53+
54+
- [Home page](http://ng.ant.design)
55+
- [Angular](https://angular.io)
56+
- [Angular CLI](https://cli.angular.io/)
57+
- [TypeScript](https://www.typescriptlang.org/)
58+
- [RxJS](https://github.com/ReactiveX/rxjs)
59+
60+
61+
## Contributing
62+
63+
We welcome all contributions. Please read our [CONTRIBUTING.md](https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/CONTRIBUTING.md) first.
64+
You can submit any ideas as [pull request](https://github.com/NG-ZORRO/ng-zorro-antd/pulls),or as [GitHub issues](https://github.com/NG-ZORRO/ng-zorro-antd/issues)

0 commit comments

Comments
 (0)
Please sign in to comment.