src/main/main.js
/**
 Dock and tray integration
 Notifications
 Menus
 Shortcuts
 Drag and drop
 Crash reporting
 Signed installers for all three platforms
 Automatic updaters for Mac and Windows
 Fast startup
 One-step build
 */
Dock and tray integration
Notifications
Menus
Shortcuts
Drag and drop
Crash reporting
Signed installers for all three platforms
Automatic updaters for Mac and Windows
Fast startup
One-step build
Dock and tray integration Notifications Menus Shortcuts Drag and drop Crash reporting Signed installers for all three platforms Automatic updaters for Mac and Windows Fast startup One - step build
function createWindow() {
    const mainWindow = new BrowserWindow({
        width: 800,
        height: 600,
        webPreferences: {
            preload: path.join(__dirname, 'preload.js')
        }
    });
    mainWindow.loadURL(formatUrl({
        pathname: path.join(__dirname, 'index.html'),
        protocol: 'file',
        slashes: true
      }))
    createChannel();
    appMenu.create(mainWindow);
    tray.setTray();
    globalShortcuts.registerShortcuts();
    mainWindow.webContents.openDevTools();
}
function createWindow ( ) { const mainWindow = new BrowserWindow ( { width : 800 , height : 600 , webPreferences : { preload : path . join ( __dirname , 'preload.js' ) } } ) ; mainWindow . loadURL ( formatUrl ( { pathname : path . join ( __dirname , 'index.html' ) , protocol : 'file' , slashes : true } ) ) createChannel ( ) ; appMenu . create ( mainWindow ) ; tray . setTray ( ) ; globalShortcuts . registerShortcuts ( ) ; mainWindow . webContents . openDevTools ( ) ; }
Dock and tray integration
Notifications
Menus
Shortcuts
Drag and drop
Crash reporting
Signed installers for all three platforms
Automatic updaters for Mac and Windows
Fast startup
One-step build
Dock and tray integration Notifications Menus Shortcuts Drag and drop Crash reporting Signed installers for all three platforms Automatic updaters for Mac and Windows Fast startup One - step build
// Create the browser window. // Crash reporter init and start // crashReporter.init(); // crashReporter.start(); // and load the index.html of the app. // create channel // build app menu // create tray // register global shortcuts // updater.init(); // Open the DevTools.