学习使用 Ant Design Pro
学习资料 https://www.cnblogs.com/7tiny/p/13444963.html
1、安装环境
(1)安装npm/cnpm
//换资源库
npm config set registry https://registry.npm.taobao.org
//换成cnpm并配置资源库
npm install -g cnpm --registry=https://registry.npm.taobao.org
//https://www.cnblogs.com/webdragon/p/9700879.html
npm cache clean -f
npm install -g n
npm install -g n --force
//https://www.cnblogs.com/lansan0701/p/7019031.html
cnpm rebuild node-sass
(2)安装tyarn
cnpm install yarn tyarn -g
yarn config set registry https://registry.npm.taobao.org -g
如果windows powershell 不能执行yarn那么需要
//在c:windows下执行get-ExecutionPolicy,如果显示的是Restricted说明他是禁止的。
get-ExecutionPolicy
接下来就要执行set-ExecutionPolicy RemoteSigned回车,输入A 然后回车就好了。
//set-ExecutionPolicy RemoteSigned
(3)安装git
2、下载代码运行
npx npx create-umi myapp
//项目目录
cd myapp
//安装
cnpm install
//运行
//cnpm run dev
cnpm run start