Skip to content

Instantly share code, notes, and snippets.

@SomeKay
Created August 4, 2015 19:00
Show Gist options
  • Save SomeKay/44b5de344405860026ea to your computer and use it in GitHub Desktop.
Save SomeKay/44b5de344405860026ea to your computer and use it in GitHub Desktop.
main.js with browser definitions for the sound machine
'use strict';
var app = require('app');
var BrowserWindow = require('browser-window');
var mainWindow = null;
app.on('ready', function() {
mainWindow = new BrowserWindow({
frame: false,
height: 700,
resizable: false,
width: 368
});
mainWindow.loadUrl('file://' + __dirname + '/app/index.html');
});
@una
Copy link

una commented Sep 17, 2017

This is outdated Electron syntax. For electron prebuilt 0.30.3:

'use strict';

const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;

let mainWindow = null;

app.on('ready', function() {
    mainWindow = new BrowserWindow({
        frame: false,
        height: 700,
        resizable: false,
        width: 368
    });

    mainWindow.loadURL('file://' + __dirname + '/app/index.html');
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment