Skip to content

Commit b72290d

Browse files
committed
setup package and build script
1 parent a80a87c commit b72290d

7 files changed

+10627
-9279
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/build
1313

1414
/dist/*
15+
/release-builds
1516

1617
# misc
1718
.DS_Store

electimer-v0.1.0.tgz

-395 KB
Binary file not shown.

electron/electron.ts

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const electron = require('electron');
2+
const app = electron.app;
3+
const BrowserWindow = electron.BrowserWindow;
4+
5+
const path = require('path');
6+
const url = require('url');
7+
const isDev = require('electron-is-dev');
8+
9+
let mainWindow;
10+
11+
function createWindow() {
12+
mainWindow = new BrowserWindow({width: 900, height: 680});
13+
mainWindow.loadURL(isDev ? 'http://localhost:3000' : `file://${path.join(__dirname, '../build/index.html')}`);
14+
mainWindow.on('closed', () => mainWindow = null);
15+
}
16+
17+
app.on('ready', createWindow);
18+
19+
app.on('window-all-closed', () => {
20+
if (process.platform !== 'darwin') {
21+
app.quit();
22+
}
23+
});
24+
25+
app.on('activate', () => {
26+
if (mainWindow === null) {
27+
createWindow();
28+
}
29+
});

electron/main.ts

-22
This file was deleted.

0 commit comments

Comments
 (0)