Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- const electron = require('electron')
- const app = electron.app
- const path = require('path')
- const url = require('url')
- let mainWindow
- function createWindow () {
- mainWindow = new electron.BrowserWindow({width: 1366, height: 768})
- mainWindow.loadURL(url.format({
- pathname: path.join(__dirname, 'index.html'),
- protocol: 'file:',
- slashes: true
- }))
- mainWindow.on('closed', function () {
- mainWindow = null
- })
- }
- app.on('ready', createWindow)
- // Quit when all windows are closed.
- app.on('window-all-closed', function () {
- if (process.platform !== 'darwin') {
- app.quit()
- }
- })
- app.on('activate', function () {
- if (mainWindow === null) {
- createWindow()
- }
- })
- // In this file you can include the rest of your app's specific main process
- // code. You can also put them in separate files and require them here.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement