Created
October 16, 2015 09:52
-
-
Save irwansyahwii/af13e88150387bac9f5f to your computer and use it in GitHub Desktop.
Electron Most Basic 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
app = require("app") | |
BrowserWindow = require("browser-window") | |
Path = require("path") | |
require("crash-reporter").start() | |
mainWindow = null | |
app.on("window-all-closed", -> | |
if process.platform isnt 'darwin' | |
app.quit() | |
) | |
app.on("ready", -> | |
mainWindow = new BrowserWindow | |
width:800 | |
height: 600 | |
curDir = __dirname | |
indexHtmlPath = Path.resolve(curDir, "../index.html") | |
mainWindow.loadUrl("file://#{indexHtmlPath}") | |
mainWindow.on("closed", -> | |
mainWindow = null | |
) | |
return | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment