Created
April 24, 2018 22:32
-
-
Save mikeal/a9e73d7e6fb89106fb8327d9577e77b7 to your computer and use it in GitHub Desktop.
Application file for Vue.js Electron demo app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const electron = require('electron') | |
const app = electron.app | |
const BrowserWindow = electron.BrowserWindow | |
let url | |
if (process.env.NODE_ENV === 'DEV') { | |
url = 'http://localhost:8080/' | |
} else { | |
url = `file://${process.cwd()}/dist/index.html` | |
} | |
app.on('ready', () => { | |
let window = new BrowserWindow({width: 800, height: 600}) | |
window.loadURL(url) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment