Last active
March 29, 2019 02:08
-
-
Save vivek081166/29a5ae2e43d6fd65f6050926668254ca 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
import {app, BrowserWindow} from 'electron'; | |
import * as path from 'path'; | |
import * as url from 'url'; | |
let win: BrowserWindow; | |
app.on('ready', createWindow); | |
app.on('activate', () => { | |
if (win === null) { | |
createWindow(); | |
} | |
}); | |
function createWindow() { | |
win = new BrowserWindow({width: 800, height: 600}); | |
win.loadURL( | |
url.format({ | |
pathname: path.join(__dirname, `/../../dist/teachable-desktop-automation/index.html`), | |
protocol: 'file:', | |
slashes: true, | |
}), | |
); | |
win.webContents.openDevTools(); | |
win.on('closed', () => { | |
win = null; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment