dappconnect-sdks/packages/components/scripts/storybook.js

18 lines
478 B
JavaScript

#!/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')
const subprocess = child_process.spawn('yarn', ['storybook:dev'], {
detached: true,
stdio: 'inherit',
})
process.once('SIGINT', () => {
process.kill(-subprocess.pid, 'SIGKILL')
})