build: enable JS semicolons (#22783)
This commit is contained in:
parent
24e21467b9
commit
5d657dece4
354 changed files with 21512 additions and 21510 deletions
|
@ -1,28 +1,28 @@
|
|||
const { app, BrowserWindow, ipcMain } = require('electron')
|
||||
const path = require('path')
|
||||
const { app, BrowserWindow, ipcMain } = require('electron');
|
||||
const path = require('path');
|
||||
|
||||
process.noDeprecation = true
|
||||
process.noDeprecation = true;
|
||||
|
||||
process.on('uncaughtException', (e) => {
|
||||
console.error(e)
|
||||
process.exit(1)
|
||||
})
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
app.allowRendererProcessReuse = JSON.parse(process.argv[2])
|
||||
app.allowRendererProcessReuse = JSON.parse(process.argv[2]);
|
||||
|
||||
const pids = []
|
||||
let win
|
||||
const pids = [];
|
||||
let win;
|
||||
|
||||
ipcMain.on('pid', (event, pid) => {
|
||||
pids.push(pid)
|
||||
pids.push(pid);
|
||||
if (pids.length === 2) {
|
||||
console.log(JSON.stringify(pids))
|
||||
if (win) win.close()
|
||||
app.quit()
|
||||
console.log(JSON.stringify(pids));
|
||||
if (win) win.close();
|
||||
app.quit();
|
||||
} else {
|
||||
if (win) win.reload()
|
||||
if (win) win.reload();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
app.whenReady().then(() => {
|
||||
win = new BrowserWindow({
|
||||
|
@ -30,6 +30,6 @@ app.whenReady().then(() => {
|
|||
webPreferences: {
|
||||
preload: path.resolve(__dirname, 'preload.js')
|
||||
}
|
||||
})
|
||||
win.loadFile('index.html')
|
||||
})
|
||||
});
|
||||
win.loadFile('index.html');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue