Skip to content

Commit bf2c604

Browse files
committed
Add basic Electron support
See #3. Suggested-by: Jari Van Melckebeke <[email protected]> Signed-off-by: Felipe Contreras <[email protected]>
1 parent bbb8c58 commit bf2c604

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules/
2+
/package-lock.json

main.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const { app, BrowserWindow } = require('electron');
2+
3+
app.on('ready', () => {
4+
const win = new BrowserWindow({
5+
width: 1000,
6+
height: 600,
7+
autoHideMenuBar: true,
8+
});
9+
10+
win.loadFile('index.html');
11+
});
12+
13+
app.on('window-all-closed', () => {
14+
if (process.platform !== 'darwin') app.quit();
15+
});

package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "math-notepad",
3+
"version": "1.0.0",
4+
"description": "Very simple math.js editor",
5+
"main": "main.js",
6+
"author": "Felipe Contreras",
7+
"scripts": {
8+
"start": "electron ."
9+
},
10+
"devDependencies": {
11+
"electron": "^19.0.9"
12+
}
13+
}

0 commit comments

Comments
 (0)