Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Sep 23, 2022
1 parent b2d8e0c commit 23cfee4
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 30 deletions.
46 changes: 31 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,22 +82,38 @@ We need your help: https://github.com/ant-design/ant-design-pro/issues/120

### Use bash

We provide pro-cli to quickly initialize scaffolding.

```bash
$ mkdir <your-project-name>
$ cd <your-project-name>
$ yarn create umi # or npm create umi

# Choose ant-design-pro:
Select the boilerplate type (Use arrow keys)
❯ ant-design-pro - Create project with an layout-only ant-design-pro boilerplate, use together with umi block.
app - Create project with a simple boilerplate, support typescript.
block - Create a umi block.
library - Create a library with umi.
plugin - Create a umi plugin.

$ git init
$ npm install
$ npm start # visit http://localhost:8000
# use npm
npm i @ant-design/pro-cli -g
pro create myapp
```

select umi version

```shell
🐂 Use umi@4 or umi@3 ? (Use arrow keys)
❯ umi@4
umi@3
```

> If the umi@4 version is selected, full blocks are not yet supported.
If you choose umi@3, you can also choose the pro template. Pro is the basic template, which only provides the basic content of the framework operation. Complete contains all blocks, which is not suitable for secondary development as a basic template.

```shell
? 🚀 Full or a simple scaffold? (Use arrow keys)
❯ simple
complete
```

Install dependencies:

```shell
$ cd myapp && tyarn
// or
$ cd myapp && npm install
```

## Browsers support
Expand Down
46 changes: 31 additions & 15 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,38 @@ Language : [🇺🇸](./README.md) | 🇨🇳 | [🇷🇺](./README.ru-RU.md) |

## 使用

我们提供了 pro-cli 来快速的初始化脚手架。

```bash
$ mkdir <your-project-name>
$ cd <your-project-name>
$ yarn create umi # or npm create umi

# Choose ant-design-pro:
Select the boilerplate type (Use arrow keys)
❯ ant-design-pro - Create project with an layout-only ant-design-pro boilerplate, use together with umi block.
app - Create project with a simple boilerplate, support typescript.
block - Create a umi block.
library - Create a library with umi.
plugin - Create a umi plugin.

$ git init
$ npm install
$ npm start # visit http://localhost:8000
# 使用 npm
npm i @ant-design/pro-cli -g
pro create myapp
```

选择 umi 的版本

```shell
? 🐂 使用 umi@4 还是 umi@3 ? (Use arrow keys)
❯ umi@4
umi@3
```

> 如果选择了 umi@4 版本,暂时还不支持全量区块。
如果选择了 umi@3,还可以选择 pro 的模板,pro 是基础模板,只提供了框架运行的基本内容,complete 包含所有区块,不太适合当基础模板来进行二次开发

```shell
? 🚀 要全量的还是一个简单的脚手架? (Use arrow keys)
❯ simple
complete
```

安装依赖:

```shell
$ cd myapp && tyarn
// 或
$ cd myapp && npm install
```

更多信息请参考 [使用文档](http://pro.ant.design/docs/getting-started)
Expand Down

0 comments on commit 23cfee4

Please sign in to comment.