今天试了一把最新版本(v5.2.0)Ant Design Pro myapp demo:
确保安装cnpm,比npm快。有大把时间的可以忽略:
npm install -g cnpm --registry=https://registry.npm.taobao.org
npm config set registry https://registry.npm.taobao.org
1. cd一个空目录,git clone https://github.com/ant-design/ant-design-pro.git
2. cd ant-desig-pro,npx create-umi myapp
-- 选JavaScript
-- 选Simple
3. cd myapp,修改myapp的package.json,不然在husky install这步报错“.git can't be found (see https://git.io/Jc3F9)”。找到prepare那一行改成:
"prepare": "cd .. && husky install myapp/.husky",
4. cd myapp,cnpm install & cnpm run start
5. 浏览器打开http://localhost:8000/