新建一個空的文件夾作為項目的目錄,並在目錄下執行
yarn create umi 或者 npm create umi
如果不創建空目錄,可以執行
yarn create umi appname 或者 npm create umi appname
選擇ant design pro
Select the boilerplate type (Use arrow keys) ❯ ant-design-pro - Create project with an layout-only ant-design-pro boilerplate, use together with umi block. app - Create project with a simple boilerplate, support typescript. block - Create a umi block. library - Create a library with umi. plugin - Create a umi plugin.
選擇安裝的版本
? Select the boilerplate type ant-design-pro ? � Be the first to experience the new umi@3 ? (Use arrow keys) Pro V5 > Pro V4
選擇語言類型
? Select the boilerplate type ant-design-pro ? � Be the first to experience the new umi@3 ? Pro V4 ? � Which language do you want to use? TypeScript > JavaScript
選擇簡單還是全部安裝
? Select the boilerplate type ant-design-pro ? � Be the first to experience the new umi@3 ? Pro V4 ? � Which language do you want to use? JavaScript ? � Do you need all the blocks or a simple scaffold? (Use arrow keys) > simple complete
安裝完成后安裝依賴
yarn 獲取 npm install
啟動項目
yanr start 或者 npm start
