Getting Started

chenshuai2144afc163viztorddcat1115RaymonfgardnerChaituVRyutingzhao1991Ustimovnestoralonsoyagudaevlfarrocomemoryzablkdrandersonlinnikogu
Last updated on 2020-09-10 23:43:30

Ant Design Pro is based on umi to frame scaffolding, and we can initialize and start scaffolding with a simple operation.

Init

We provide create umi to quickly initialize scaffolding.

# use by npm
npx create umi
# use by yarn
yarn create umi

Create umi offers a wide range of options to meet the scaffolding needs of different users, and we can choose to develop the language JavaScript or TypeScript.

language

You can also choose whether to get all the chunks.

simple

Select the version of antd, 3 or 4.

antd

A successful scaffold log.

end

Development

The development can begin after the initialization of the scaffolding is successful, and we have provided some commands to assist in the development.

start

Running this script starts the service and automatically opens the default browser to show your page. When you re-edit the code, the page will also refresh automatically.

start

build

Running this script will compile your project, and you can find the compiled files in the dist directory of the project for deployment.

build

If you need to deploy, you can review the [deployment]((/docs/deploy).

analyze

The analyze script does the same thing as build, but he opens a page showing your dependency information. If you need to optimize performance and package size, you need it.

analyze

lint

We offer a range of lint scripts, including TypeScript, less, css, md files. You can use this script to see what problems your code has. In commit we automatically run the related lint.

lint

lint:fix

Same as lint, but the lint error is fixed automatically.

lint:fix

i18n-remove

This script will attempt to remove all i18n code from the project, which is not good for complex run-time code and is used with caution.