aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
authorUnknown <Alee14498@gmail.com>2017-10-21 18:53:36 -0400
committerUnknown <Alee14498@gmail.com>2017-10-21 18:53:36 -0400
commit3c14f4afc8a8a20a113c7ff8c56022e8825c40d1 (patch)
tree87e266acf0f5e18fc8dde19f41022cee2fc0a6ae /src/index.js
parent4bad937c7fcb1c35b28d6e806c69f129f969447e (diff)
downloadAleeBot-3c14f4afc8a8a20a113c7ff8c56022e8825c40d1.tar.gz
AleeBot-3c14f4afc8a8a20a113c7ff8c56022e8825c40d1.tar.bz2
AleeBot-3c14f4afc8a8a20a113c7ff8c56022e8825c40d1.zip
Added electron
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js
index e69de29..27b7f3a 100644
--- a/src/index.js
+++ b/src/index.js
@@ -0,0 +1,35 @@
+/*********************************************
+*
+* AleeBot for Discord servers
+* Copyright (C) 2017 AleeCorp
+*
+**********************************************/
+const {app, BrowserWindow} = require('electron');
+const path = require('path');
+const url = require('url');
+
+let win;
+
+function createWindow(){
+ win = new BrowserWindow({width:800, height:600})
+
+ win.loadURL(url.format({
+ pathname: path.join(__dirname, 'setup.html'),
+ protocol: 'file:',
+ slashes: true
+ }));
+
+ win.webContents.openDevTools();
+
+ win.on('closed', () => {
+ win = null;
+ });
+ }
+
+ app.on('ready', createWindow);
+
+ app.on('window-all-closed', () => {
+ if(process.platform !== 'darwin'){
+ app.quit();
+ }
+ }); \ No newline at end of file