const electron = require ( 'electron' ) ; const { app , BrowserWindow } = electron ; const installExtension = require ( 'electron-devtools-installer' ) ; require ( 'electron-reload' ) ( __dirname ) ; let mainWindow ; app . on ( 'ready' , ( ) => { mainWindow = new BrowserWindow ( { width : 800 , height : 600 , webPreferences : { nodeIntegration : true , } , } ) ; mainWindow . loadFile ( `./app/index.html` ) ; installExtension . default ( installExtension . REACT_DEVELOPER_TOOLS ) . then ( ( name ) => console . log ( `Added Extension:  ${ name }` ) ) . catch ( ( err ) => console . log ( 'An error occurred: ' , err ) ) ; installExtension . default ( installExtension . REDUX_DEVTOOLS ) . then ( ( name ) => console . log ( `Added Extension:  ${ name }` ) ) . catch ( ( err ) => console . log ( 'An error occurred: ' , err ) ) ; mainWindow . webContents . openDevTools ( ) ; } ) ;