imrishabh18/corne-keyboard
The code defines and renders two surface-mount chip components with SMT pads, silkscreen outlines, and 3D CAD models (OBJ and STEP) for PCB assembly.
- Version
- 2.0.21
- License
- unset
- Stars
- 1
scripts/dev-local.mjs
import { spawn, spawnSync } from 'node:child_process'
import { resolve, dirname } from 'node:path'
import { fileURLToPath } from 'node:url'
const scripts = dirname(fileURLToPath(import.meta.url))
const project = resolve(scripts, '..')
const build = spawnSync(process.execPath, [resolve(scripts, 'build-local-browser-runtime.mjs')], {
cwd: project, stdio: 'inherit',
})
if (build.error) throw build.error
if (build.status !== 0) process.exit(build.status ?? 1)
const child = spawn('bun', [resolve(project, 'node_modules/tscircuit/cli.mjs'), 'dev', ...process.argv.slice(2)], {
cwd: project,
stdio: 'inherit',
env: { ...process.env, RUNFRAME_STANDALONE_FILE_PATH: resolve(project, '.tscircuit/local-runtime/runframe.js') },
})
for (const signal of ['SIGINT', 'SIGTERM']) process.on(signal, () => child.kill(signal))
child.on('error', (error) => { console.error(error); process.exitCode = 1 })
child.on('exit', (code, signal) => { process.exitCode = code ?? (signal === 'SIGINT' ? 130 : 1) })