Created
October 4, 2015 07:06
-
-
Save naosim/a24911b50f8bbf0a29d5 to your computer and use it in GitHub Desktop.
electronの基本形
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
'use strict'; | |
var app = require('app'); | |
var BrowserWindow = require('browser-window'); | |
require('crash-reporter').start(); | |
app.on('window-all-closed', function() { | |
if (process.platform != 'darwin') app.quit(); | |
}); | |
app.on('ready', function() { | |
var mainWindow = new BrowserWindow({width: 800, height: 600}); | |
mainWindow.on('closed', function() { | |
mainWindow = null; | |
}); | |
mainWindow.loadUrl('file://' + __dirname + '/index.html'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment