-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
27 lines (20 loc) · 768 Bytes
/
Copy pathmain.js
File metadata and controls
27 lines (20 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const electron = require('electron');
const path = require('path');
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
// Reload application on changes in src folder
require('electron-reload')(path.join(__dirname, 'src'), {
ignored: /^.*\.(json|txt)$/,
electron: require(path.join(__dirname, 'node_modules', 'electron'))
});
let mainWindow;
app.on('ready', () => {
mainWindow = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true }, icon: "src/logo.png" });
// Open Development Tools
mainWindow.openDevTools();
mainWindow.loadURL('file://' + __dirname + '/public/index.html');
});
app.on('window-all-closed', () => {
app.quit();
});