lemmy-phpbb-sveltejs/rollup_start_dev.js
Conduitry 66cb32c6fc
don't start dev server until bundle is generated (#73)
* don't start dev server until bundle is generated (#72)

* extract `npm run start:dev` spawn into separate file
2019-10-23 09:43:45 -04:00

12 lines
283 B
JavaScript

import * as child_process from 'child_process';
let running_dev_server = false;
export default {
writeBundle() {
if (!running_dev_server) {
running_dev_server = true;
child_process.spawn('npm', ['run', 'start:dev'], { stdio: ['ignore', 'inherit', 'inherit'] });
}
}
};