function installMenu() {
    let template;
    template = [{
        label: 'Electron',
        submenu: [{
            label: 'About Electron',
            selector: 'orderFrontStandardAboutPanel:'
        }, {
            type: 'separator'
        }, {
            label: 'Services',
            submenu: []
        }, {
            type: 'separator'
        }, {
            label: 'Hide Electron',
            accelerator: 'Command+H',
            selector: 'hide:'
        }, {
            label: 'Hide Others',
            accelerator: 'Command+Shift+H',
            selector: 'hideOtherApplications:'
        }, {
            label: 'Show All',
            selector: 'unhideAllApplications:'
        }, {
            type: 'separator'
        }, {
            label: 'Quit',
            accelerator: 'Command+Q',
            click: function() {
                app.quit();
            }
        }, ]
    }, {
        label: 'View',
        submenu: [{
            label: 'Reload',
            accelerator: 'Command+R',
            click: function() {
                win.restart();
            }
        }, {
            label: 'Toggle Full Screen',
            accelerator: 'Ctrl+Command+F',
            click: function() {
                win.setFullScreen(!win.isFullScreen());
            }
        }, {
            label: 'Toggle Developer Tools',
            accelerator: 'Alt+Command+I',
            click: function() {
                win.toggleDevTools();
            }
        }, ]
    }];
    const menu = Menu.buildFromTemplate(template)
    Menu.setApplicationMenu(menu);
}
// code. You can also put them in separate files and require them here.
code. You can also put them in separate files and require them here.
code . You can also put them in separate files and require them here .
function installMenu() {
    let template;
    template = [{
        label: 'Electron',
        submenu: [{
            label: 'About Electron',
            selector: 'orderFrontStandardAboutPanel:'
        }, {
            type: 'separator'
        }, {
            label: 'Services',
            submenu: []
        }, {
            type: 'separator'
        }, {
            label: 'Hide Electron',
            accelerator: 'Command+H',
            selector: 'hide:'
        }, {
            label: 'Hide Others',
            accelerator: 'Command+Shift+H',
            selector: 'hideOtherApplications:'
        }, {
            label: 'Show All',
            selector: 'unhideAllApplications:'
        }, {
            type: 'separator'
        }, {
            label: 'Quit',
            accelerator: 'Command+Q',
            click: function() {
                app.quit();
            }
        }, ]
    }, {
        label: 'View',
        submenu: [{
            label: 'Reload',
            accelerator: 'Command+R',
            click: function() {
                win.restart();
            }
        }, {
            label: 'Toggle Full Screen',
            accelerator: 'Ctrl+Command+F',
            click: function() {
                win.setFullScreen(!win.isFullScreen());
            }
        }, {
            label: 'Toggle Developer Tools',
            accelerator: 'Alt+Command+I',
            click: function() {
                win.toggleDevTools();
            }
        }, ]
    }];
    const menu = Menu.buildFromTemplate(template)
    Menu.setApplicationMenu(menu);
}
function installMenu ( ) { let template ; template = [ { label : 'Electron' , submenu : [ { label : 'About Electron' , selector : 'orderFrontStandardAboutPanel:' } , { type : 'separator' } , { label : 'Services' , submenu : [ ] } , { type : 'separator' } , { label : 'Hide Electron' , accelerator : 'Command+H' , selector : 'hide:' } , { label : 'Hide Others' , accelerator : 'Command+Shift+H' , selector : 'hideOtherApplications:' } , { label : 'Show All' , selector : 'unhideAllApplications:' } , { type : 'separator' } , { label : 'Quit' , accelerator : 'Command+Q' , click : function ( ) { app . quit ( ) ; } } , ] } , { label : 'View' , submenu : [ { label : 'Reload' , accelerator : 'Command+R' , click : function ( ) { win . restart ( ) ; } } , { label : 'Toggle Full Screen' , accelerator : 'Ctrl+Command+F' , click : function ( ) { win . setFullScreen ( ! win . isFullScreen ( ) ) ; } } , { label : 'Toggle Developer Tools' , accelerator : 'Alt+Command+I' , click : function ( ) { win . toggleDevTools ( ) ; } } , ] } ] ; const menu = Menu . buildFromTemplate ( template ) Menu . setApplicationMenu ( menu ) ; }
code.
code .