Commit 2bba791d by David Neumaier

init

parents
electron-quick-start/
node_modules/
const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const path = require('path');
const url = require('url');
var mainWindow
function createWindow () {
mainWindow = new BrowserWindow({width: 720, height: 480})
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, 'view/main.html'),
protocol: 'file:',
slashes: true
}))
// Emitted when the window is closed.
mainWindow.on('closed', function () {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
mainWindow = null
})
}
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow)
app.on('window-all-closed', function () {
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', function () {
if (mainWindow === null) {
createWindow()
}
})
// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.
{
"name": "tunode",
"version": "0.0.1",
"description": "",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "electron ."
},
"author": "Sygade Studios <dave@sygade.eu> (http://sygade.eu)",
"license": "ISC",
"devDependencies": {
"electron": "^1.4.1"
},
"dependencies": {
"play-sound": "^1.1.1",
"sygtools": "^0.2.7"
}
}
body {
background-color: #161616;
font-size: 12px;
color: #DEDEDE;
font-family: sans-serif;
}
h1 {
font-size: 18px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>tunode.</title>
<link rel="stylesheet" href="main.css"></link>
</head>
<body>
<h1>sers.</h1>
</body>
<script>
require('./renderer.js')
</script>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment