import { app } from 'electron' ; import log from 'electron-log' ; import { autoUpdater } from 'electron-updater' ; import { Bootstrap } from './electron/Bootstrap' ; let bs ; if ( process . env . NODE_ENV !== 'production' ) { log . transports . file . level = 'verbose' ; } const allocMainWindow = ( ) => { autoUpdater . checkForUpdatesAndNotify ( ) ; bs = new Bootstrap ( ) ; bs . compositor . on ( 'closed' , ( ) => { ( bs as any ) = null ; } ) ; } ; app . on ( 'ready' , allocMainWindow ) ; app . on ( 'activate' , ( ) => { if ( bs === null ) { allocMainWindow ( ) ; } } ) ; app . on ( 'window-all-closed' , ( ) => { if ( process . platform !== 'darwin' ) { app . quit ( ) ; } } ) ;