Skip to content

Instantly share code, notes, and snippets.

@irwansyahwii
Created October 16, 2015 09:52
Show Gist options
  • Save irwansyahwii/af13e88150387bac9f5f to your computer and use it in GitHub Desktop.
Save irwansyahwii/af13e88150387bac9f5f to your computer and use it in GitHub Desktop.
Electron Most Basic App
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