MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / startElectronProcess

Function startElectronProcess

scripts/dev-electron.ts:45–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45async function startElectronProcess() {
46 const electronBinary = await ensureElectronBinary()
47
48 const child = spawn(electronBinary, [entryFile], {
49 cwd: projectRoot,
50 stdio: 'inherit',
51 env: {
52 ...process.env,
53 HOWCODE_REPO_ROOT: projectRoot,
54 HOWCODE_DEV_VIEWPORT: getRequestedViewport() ?? '',
55 },
56 })
57
58 electronProcess = child
59
60 child.on('exit', () => {
61 if (electronProcess === child) {
62 electronProcess = null
63 }
64 })
65}
66
67function stopElectronProcess() {
68 if (!electronProcess) {

Callers 2

scheduleRestartFunction · 0.85
mainFunction · 0.85

Calls 3

ensureElectronBinaryFunction · 0.90
spawnFunction · 0.85
getRequestedViewportFunction · 0.85

Tested by

no test coverage detected