Skip to content

Instantly share code, notes, and snippets.

@naosim
Created October 4, 2015 07:06
Show Gist options
  • Save naosim/a24911b50f8bbf0a29d5 to your computer and use it in GitHub Desktop.
Save naosim/a24911b50f8bbf0a29d5 to your computer and use it in GitHub Desktop.
electronの基本形
'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