This repository has been archived on 2023-12-22. You can view files and clone it, but cannot push or open issues or pull requests.
old-monorepo/_Dashboard/tasks/electron.js

23 lines
504 B
JavaScript

const { spawn } = require('child_process');
const electron = require('electron');
let subprocess;
function startElectron(done) {
subprocess = spawn(electron, ['.', '--no-sandbox'], {
env: { ...process.env, NODE_ENV: 'development' },
stdio: 'inherit',
});
done();
}
function stopElectron() {
subprocess.kill();
return subprocess;
}
startElectron.displayName = 'start-electron';
stopElectron.displayName = 'stop-electron';
exports.start = startElectron;
exports.stop = stopElectron;