MCPcopy Create free account
hub / github.com/TanStack/ai / createSpawnConfig

Function createSpawnConfig

examples/ts-react-native-chat/scripts/dev.mjs:187–217  ·  view source on GitHub ↗
({
  command,
  args,
  cwd,
  env,
  platform = process.platform,
  stdio = 'inherit',
})

Source from the content-addressed store, hash-verified

185}
186
187export function createSpawnConfig({
188 command,
189 args,
190 cwd,
191 env,
192 platform = process.platform,
193 stdio = 'inherit',
194}) {
195 if (platform === 'win32') {
196 return {
197 command: env?.ComSpec ?? 'cmd.exe',
198 args: ['/d', '/s', '/c', command, ...args],
199 options: {
200 cwd,
201 env,
202 stdio,
203 windowsHide: false,
204 },
205 }
206 }
207
208 return {
209 command,
210 args,
211 options: {
212 cwd,
213 env,
214 stdio,
215 },
216 }
217}
218
219function printHelp() {
220 console.log(`TanStack AI React Native dev runner

Callers 2

dev.test.mjsFile · 0.90
spawnProcessFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected