mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
docs: improve umi create project (#29473)
This commit is contained in:
parent
059416e67e
commit
bf9f2e8918
@ -5,7 +5,7 @@ title: Real project with umi
|
|||||||
|
|
||||||
In real project development, you may need data flow solutions such as Redux or MobX. Ant Design React is a UI library that can be used with data flow solutions and application frameworks in any React ecosystem. Based on the business scenario, we launched a pluggable enterprise-level application framework umi, which is recommended for use in the project.
|
In real project development, you may need data flow solutions such as Redux or MobX. Ant Design React is a UI library that can be used with data flow solutions and application frameworks in any React ecosystem. Based on the business scenario, we launched a pluggable enterprise-level application framework umi, which is recommended for use in the project.
|
||||||
|
|
||||||
And [umi](https://umijs.org) is a routing-based framework that supports [next.js-like conventional routing](https://umijs.org/docs/convention-routing) and various advanced routing functions, such as [routing-level on-demand loading](https://umijs.org/config#dynamicimport). With a complete [plugin system](https://umijs.org/plugins/api) that covers every life cycle from source code to build product, umi is able to support various functional extensions and business needs; meanwhile [Umi UI](https://umijs.org/zh-CN/docs/use-umi-ui) is provided to enhance the development experience and development efficiency through Visual Aided Programming (VAP).
|
And [umi](https://umijs.org) is a routing-based framework that supports [next.js-like conventional routing](https://umijs.org/docs/convention-routing) and various advanced routing functions, such as [routing-level on-demand loading](https://umijs.org/config#dynamicimport). With a complete [plugin system](https://umijs.org/plugins/api) that covers every life cycle from source code to build product, umi is able to support various functional extensions and business needs; meanwhile [Umi UI](https://umijs.org/docs/use-umi-ui) is provided to enhance the development experience and development efficiency through Visual Aided Programming (VAP).
|
||||||
|
|
||||||
> You may also be interested in [Ant Design Pro](https://pro.ant.design/), an Out-of-box UI solution for enterprise applications based on umi, dva and ant design.
|
> You may also be interested in [Ant Design Pro](https://pro.ant.design/), an Out-of-box UI solution for enterprise applications based on umi, dva and ant design.
|
||||||
|
|
||||||
@ -17,20 +17,11 @@ It is recommended to use yarn to create an application and execute the following
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ mkdir myapp && cd myapp
|
$ mkdir myapp && cd myapp
|
||||||
$ yarn create umi
|
$ yarn create @umijs/umi-app
|
||||||
$ yarn
|
$ yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
> If you use npm, you can execute `npx create-umi` with the same effect.
|
> If you use npm, you can execute `npx @umijs/create-umi-app` with the same effect.
|
||||||
|
|
||||||
## Install presets
|
|
||||||
|
|
||||||
Execute the following command, install presets(including the antd, dva, locale plugins):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 或 npm i @umijs/preset-react -D
|
|
||||||
$ yarn add @umijs/preset-react -D
|
|
||||||
```
|
|
||||||
|
|
||||||
> And if you want to use a fixed version of antd, you can install additional antd dependency in your project, and the antd dependencies declared in package.json will be used first.
|
> And if you want to use a fixed version of antd, you can install additional antd dependency in your project, and the antd dependencies declared in package.json will be used first.
|
||||||
|
|
||||||
|
@ -17,22 +17,13 @@ title: 项目实战
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ mkdir myapp && cd myapp
|
$ mkdir myapp && cd myapp
|
||||||
$ yarn create umi
|
$ yarn create @umijs/umi-app
|
||||||
$ yarn
|
$ yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
> 如果你使用 npm,可执行 `npx create-umi`,效果一致。
|
> 如果你使用 npm,可执行 `npx @umijs/create-umi-app`,效果一致。
|
||||||
|
|
||||||
## 安装插件集
|
> 默认使用 `"antd": "^4.0.0"`,如果要使用固定版本的 antd,你可以在项目里安装额外的 antd 依赖,`package.json` 里声明的 antd 依赖会被优先使用。
|
||||||
|
|
||||||
执行以下命令,安装插件集(包括 antd、dva、国际化等常用插件):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 或 npm i @umijs/preset-react -D
|
|
||||||
$ yarn add @umijs/preset-react -D
|
|
||||||
```
|
|
||||||
|
|
||||||
> 插件默认使用 `"antd": "^4.0.0"`,如果要使用固定版本的 antd,你可以在项目里安装额外的 antd 依赖,`package.json` 里声明的 antd 依赖会被优先使用。
|
|
||||||
|
|
||||||
## 新建路由
|
## 新建路由
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user