mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
33e035e38c
- cause webpack bundels as mainprocess stuff
19 lines
409 B
TypeScript
19 lines
409 B
TypeScript
import { app } from 'electron';
|
|
import { Main } from '../main';
|
|
|
|
export default function registerProcessListeners(main: Main) {
|
|
if (main.isDevelopment) {
|
|
if (process.platform === 'win32') {
|
|
process.on('message', (data) => {
|
|
if (data === 'graceful-exit') {
|
|
app.quit();
|
|
}
|
|
});
|
|
} else {
|
|
process.on('SIGTERM', () => {
|
|
app.quit();
|
|
});
|
|
}
|
|
}
|
|
}
|