Skip to content

Commit

Permalink
update index loading for new API
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed May 25, 2018
1 parent f9cd070 commit ec3eacb
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
const electron = require('electron')
// Module to control application life.
const app = electron.app
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow

const path = require('path')
const url = require('url')
// Modules to control application life and create native browser window
const {app, BrowserWindow} = require('electron')

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
Expand All @@ -16,11 +10,7 @@ function createWindow () {
mainWindow = new BrowserWindow({width: 800, height: 600})

// and load the index.html of the app.
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file:',
slashes: true
}))
mainWindow.loadFile('index.html')

// Open the DevTools.
// mainWindow.webContents.openDevTools()
Expand Down

0 comments on commit ec3eacb

Please sign in to comment.