2023-04-11 18:53:24 +00:00
|
|
|
#!/usr/bin/node
|
|
|
|
|
|
|
|
// todo: remove after adding `"type": "module",` to `package.json`
|
|
|
|
/* eslint-disable eslint-comments/disable-enable-pair */
|
|
|
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
|
|
|
|
|
|
const child_process = require('node:child_process')
|
|
|
|
const process = require('node:process')
|
|
|
|
|
2024-11-01 18:29:14 +00:00
|
|
|
const subprocess = child_process.spawn('pnpm', ['storybook:dev', '--no-open'], {
|
2023-04-11 18:53:24 +00:00
|
|
|
detached: true,
|
|
|
|
stdio: 'inherit',
|
|
|
|
})
|
|
|
|
|
|
|
|
process.once('SIGINT', () => {
|
|
|
|
process.kill(-subprocess.pid, 'SIGKILL')
|
|
|
|
})
|