ant-design-pro安装

2,684 阅读1分钟

本地环境需要安装 yarnnodegit

推荐使用 yarn 管理 npm 依赖,并使用国内源

# 国内源
npm install yarn tyarn -g
# 后面文档里的 yarn 换成 tyarn
tyarn -v

yarn配置淘宝镜像

yarn config set registry https://registry.npm.taobao.org/
yarn config get registry

安装JavaScript版本

npm create umi ant-design-pro-v4-blocks
cd ./ant-design-pro-v4-blocks/
tyarn
npm start

选择ant-design-proJavaScriptcomplete

? Select the boilerplate type ant-design-pro
? Which language do you want to use? JavaScript
? Do you need all the blocks or a simple scaffold? complete

安装TypeScript版本

npm create umi ant-design-pro-v4-blocks
cd ./ant-design-pro-v4-blocks/
tyarn
npm start

选择ant-design-proTypeScriptcomplete

? Select the boilerplate type ant-design-pro
? Which language do you want to use? TypeScript
? Do you need all the blocks or a simple scaffold? complete

上传到github

git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/mokedeng/ant-design-pro-blocks-js.git
git push -u origin master

windows需安装python环境,其他操作系统可参考github.com/nodejs/node…

若多次安装失败,直接去github下载JavaScript版本或者TypeScript版本,不要强求

git clone https://github.com/mokedeng/ant-design-pro-blocks-js.git
tyarn
npm start