Skip to content

Commit fb1ccda

Browse files
committed
chore: 실기기 개발 명령 정리
1 parent c283526 commit fb1ccda

7 files changed

Lines changed: 650 additions & 863 deletions

File tree

README.md

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -28,45 +28,31 @@ apps/web/src/bridge.ts # typed web client
2828
```bash
2929
nvm use
3030
pnpm install
31+
pnpm dev:device
3132
pnpm dev:web
32-
pnpm dev:web:lan
3333
pnpm dev:storybook
3434
pnpm dev:mobile
35-
pnpm dev:mobile-client
3635
pnpm typecheck
3736
pnpm lint
3837
pnpm format
3938
```
4039

4140
웹 개발 서버는 기본적으로 `http://127.0.0.1:5173`에서 실행됩니다.
4241

43-
실기기에서 Expo Go로 테스트할 때는 Mac의 LAN IP를 `.env`에 넣어야 합니다.
42+
실기기에서 Expo Go로 테스트할 때는 아래 명령을 사용합니다. 실행 시점의 Mac LAN IP를 자동으로 감지해 WebView URL에 주입합니다.
4443

4544
```bash
46-
cp .env.example .env
47-
```
48-
49-
```env
50-
EXPO_PUBLIC_WEB_URL=http://YOUR_MAC_LAN_IP:5173
51-
```
52-
53-
그 경우 웹 서버는 LAN용 명령으로 실행합니다.
54-
55-
```bash
56-
pnpm dev:web:lan
45+
pnpm dev:device
5746
```
5847

5948
## Useful Commands
6049

6150
```bash
6251
pnpm dev # web + mobile-shell 전체 dev task
6352
pnpm dev:web # React web만 실행, local/simulator
64-
pnpm dev:web:lan # React web을 LAN 접근 가능하게 실행, 실기기용
53+
pnpm dev:device # 실기기 테스트용, web + Expo Go 서버 실행
6554
pnpm dev:storybook # 디자인 시스템 Storybook 실행
6655
pnpm dev:mobile # Expo shell만 실행
67-
pnpm dev:mobile-client # installed dev-client 앱에 연결
68-
pnpm ios:dev-client # iOS dev-client 빌드/실행
69-
pnpm android:dev-client # Android dev-client 빌드/실행
7056
pnpm typecheck # 전체 타입체크
7157
pnpm lint # Biome 검사
7258
pnpm format # Biome 포맷
@@ -125,19 +111,3 @@ revert
125111
초기 세팅 추가
126112
버그 수정
127113
```
128-
129-
## Expo Dev Client
130-
131-
Expo Go로 충분한 동안은 `pnpm dev:mobile`을 쓰면 됩니다. 네이티브 SDK나 config plugin이 필요해지면 dev-client 앱을 한 번 빌드한 뒤 사용합니다.
132-
133-
```bash
134-
pnpm ios:dev-client
135-
# or
136-
pnpm android:dev-client
137-
```
138-
139-
이후에는 아래 명령으로 Metro를 dev-client 모드로 실행합니다.
140-
141-
```bash
142-
pnpm dev:mobile-client
143-
```

apps/mobile-shell/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { registerRootComponent } from 'expo';
2+
import App from './App';
3+
4+
registerRootComponent(App);

apps/mobile-shell/package.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,27 @@
22
"name": "@comma/mobile-shell",
33
"private": true,
44
"version": "0.0.0",
5-
"main": "expo/AppEntry.js",
5+
"main": "index.ts",
66
"scripts": {
77
"dev": "expo start",
8-
"dev:client": "expo start --dev-client",
8+
"dev:device": "expo start --go --lan",
99
"android": "expo start --android",
10-
"android:dev-client": "expo run:android",
1110
"ios": "expo start --ios",
12-
"ios:dev-client": "expo run:ios",
1311
"web": "expo start --web",
1412
"typecheck": "tsc --noEmit"
1513
},
1614
"dependencies": {
1715
"@comma/bridge": "workspace:*",
1816
"@webview-bridge/react-native": "^1.7.9",
19-
"expo": "~53.0.27",
20-
"expo-dev-client": "~5.2.4",
21-
"expo-status-bar": "^2.2.0",
22-
"react": "19.0.0",
23-
"react-native": "0.79.6",
24-
"react-native-webview": "13.13.5",
17+
"expo": "~54.0.35",
18+
"expo-status-bar": "^3.0.9",
19+
"react": "19.1.0",
20+
"react-native": "0.81.5",
21+
"react-native-webview": "13.15.0",
2522
"zod": "^4.4.3"
2623
},
2724
"devDependencies": {
28-
"@types/react": "~19.0.10",
29-
"typescript": "~5.8.3"
25+
"@types/react": "~19.1.17",
26+
"typescript": "~5.9.3"
3027
}
3128
}

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite --host 127.0.0.1",
8-
"dev:lan": "vite --host 0.0.0.0",
8+
"dev:device": "vite --host 0.0.0.0 --strictPort",
99
"build": "tsc -b && vite build",
1010
"typecheck": "tsc --noEmit"
1111
},

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@
55
"scripts": {
66
"dev": "turbo dev",
77
"dev:web": "turbo dev --filter=@comma/web",
8-
"dev:web:lan": "pnpm --filter @comma/web dev:lan",
98
"dev:storybook": "pnpm --filter @comma/storybook dev",
9+
"dev:device": "sh ./scripts/dev-device.sh",
1010
"dev:mobile": "turbo dev --filter=@comma/mobile-shell",
11-
"dev:mobile-client": "pnpm --filter @comma/mobile-shell dev:client",
12-
"ios:dev-client": "pnpm --filter @comma/mobile-shell ios:dev-client",
13-
"android:dev-client": "pnpm --filter @comma/mobile-shell android:dev-client",
1411
"build:storybook": "pnpm --filter @comma/storybook build-storybook",
1512
"build": "turbo build",
1613
"typecheck": "turbo typecheck",

0 commit comments

Comments
 (0)