Created
November 13, 2015 16:06
-
-
Save prozacgod/49d04bbd9b6315323011 to your computer and use it in GitHub Desktop.
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple Electron App</title> | |
<meta name="viewport" content="initial-scale=1, user-scalable=yes" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=10" /> | |
<script src='index.js'></script> | |
<style> | |
html, body { | |
overflow: hidden; | |
padding: 0; | |
margin: 0; | |
} | |
</style> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains 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
var $ = require("jquery"); | |
$(function() { | |
$('body').text("Hello World!"); | |
}); |
This file contains 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
var app = require('app'); | |
var BrowserWindow = require('browser-window'); | |
require('crash-reporter').start(); | |
var mainWindow = null; | |
app.on('window-all-closed', function() { | |
if (process.platform != 'darwin') { | |
app.quit(); | |
} | |
}); | |
app.on('ready', function() { | |
mainWindow = new BrowserWindow({width: 800, height: 600, 'auto-hide-menu-bar': true}); | |
mainWindow.loadUrl('file://' + __dirname + '/index.html'); | |
//mainWindow.toggleDevTools(); | |
mainWindow.on('closed', function() { | |
mainWindow = null; | |
}); | |
}); |
This file contains 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
{ | |
"name": "Simple Electron App", | |
"version": "0.0.0", | |
"description": "", | |
"main": "main.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"start": "electron main.js", | |
"package": "electron-packager ./ SimpleElectronApp --platform=win32 --overwrite --arch=ia32 --version=0.30.0" | |
}, | |
"author": "Some Human", | |
"license": "ISC", | |
"devDependencies": { | |
"electron-packager": "^5.0.1", | |
"electron-prebuilt": "^0.30.0" | |
}, | |
"dependencies": { | |
"jquery": "^2.1.4", | |
"q": "^1.4.1", | |
"underscore": "^1.8.3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some very simple electron boilerplate code.