npm install -g expo-cli
expo init <project-name>
//會先詢問要建立哪種專案,依照自己的需求選擇要的專案
? Choose a template: (Use arrow keys)
----- Managed workflow -----
❯ blank a minimal app as clean as an empty canvas
blank (TypeScript) same as blank but with TypeScript configuration
tabs several example screens and tabs using react-navigation
----- Bare workflow -----
minimal bare and minimal, just the essentials to get you started
minimal (TypeScript) same as minimal but with TypeScript configuration
//接著會詢問專案的名稱,輸入名稱Enter後會開始建立專案
? Please enter a few initial configuration values.
Read more: https://docs.expo.io/versions/latest/workflow/configuration/ ‣ 50% completed
{
"expo": {
"name": "<The name of your app visible on the home screen>",
"slug": "MyProject"
}
}
//專案建立完到專案的根目錄輸入以下指令就會開始執行develop server,並且自動開啟網頁
npm start
//這時在手機上下載並安裝 Expo Cient 的 App