Skip to content

Instantly share code, notes, and snippets.

@snapeuh

snapeuh/main.js Secret

Created February 9, 2017 17:37
Show Gist options
  • Save snapeuh/6a4912b7fced455cf772840056f29797 to your computer and use it in GitHub Desktop.
Save snapeuh/6a4912b7fced455cf772840056f29797 to your computer and use it in GitHub Desktop.
Default electron-quick-start file loading Vue.js documentation
const electron = require('electron')
const app = electron.app
const BrowserWindow = electron.BrowserWindow
const path = require('path')
const url = require('url')
let mainWindow
function createWindow () {
mainWindow = new BrowserWindow({width: 800, height: 600})
mainWindow.loadURL('https://vuejs.org/v2/guide/transitions.html')
mainWindow.webContents.openDevTools()
mainWindow.on('closed', function () {
mainWindow = null
})
}
app.on('ready', createWindow)
app.on('window-all-closed', function () {
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', function () {
if (mainWindow === null) {
createWindow()
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment