( kind: ResolvedMetroKind, port: number, listenHost: string, )
| 353 | } |
| 354 | |
| 355 | function buildMetroCommand( |
| 356 | kind: ResolvedMetroKind, |
| 357 | port: number, |
| 358 | listenHost: string, |
| 359 | ): PackageManagerConfig { |
| 360 | if (kind === 'expo') { |
| 361 | return { |
| 362 | command: 'npx', |
| 363 | installArgs: ['expo', 'start', '--host', 'lan', '--port', String(port)], |
| 364 | }; |
| 365 | } |
| 366 | |
| 367 | return { |
| 368 | command: 'npx', |
| 369 | installArgs: ['react-native', 'start', '--host', listenHost, '--port', String(port)], |
| 370 | }; |
| 371 | } |
| 372 | |
| 373 | function startMetroProcess( |
| 374 | projectRoot: string, |