mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
Auto-reload electron with nodemon
This commit is contained in:
@@ -82,7 +82,7 @@ function createBridgeWindow() {
|
||||
mainWindow.loadURL(getLoadUrl())
|
||||
|
||||
if (isDevBuild) {
|
||||
setUpDevTools()
|
||||
mainWindow.webContents.openDevTools()
|
||||
}
|
||||
|
||||
mainWindow.on('closed', () => {
|
||||
@@ -123,17 +123,6 @@ function getLoadUrl() {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Automatically reload the electron process on changes, and open the dev tools
|
||||
*/
|
||||
function setUpDevTools() {
|
||||
require('electron-reload')(__dirname, {
|
||||
electron: require(`${__dirname}/../../node_modules/electron`)
|
||||
})
|
||||
|
||||
mainWindow.webContents.openDevTools()
|
||||
}
|
||||
|
||||
export function emitIPCEvent<E extends keyof IPCEmitEvents>(event: E, data: IPCEmitEvents[E]) {
|
||||
mainWindow.webContents.send(event, data)
|
||||
}
|
||||
Reference in New Issue
Block a user