import * as electron from 'electron' ; export function getMenuTemplate ( debugMode ) { const template = [ ] ; if ( process . platform === 'darwin' ) { template . push ( { role : 'appMenu' , submenu : electron . Menu . buildFromTemplate ( [ { role : 'about' } , { type : 'separator' } , { role : 'services' , submenu : [ ] } , { type : 'separator' } , { role : 'hide' } , { role : 'hideOthers' } , { role : 'unhide' } , { type : 'separator' } , { role : 'quit' } ] ) } , { role : 'editMenu' } ) ; } if ( debugMode ) { template . push ( { label : 'Developer' , submenu : electron . Menu . buildFromTemplate ( [ { role : 'reload' } , { role : 'forceReload' } , { role : 'toggleDevTools' } ] ) } ) ; } return template ; }