diff --git a/index.html b/index.html new file mode 100644 index 0000000..902d144 --- /dev/null +++ b/index.html @@ -0,0 +1,20 @@ + + +
+ + + + +👋
+ + diff --git a/main.js b/main.js new file mode 100644 index 0000000..e7846e2 --- /dev/null +++ b/main.js @@ -0,0 +1,14 @@ +const { app, BrowserWindow } = require("electron"); + +const createWindow = () => { + const win = new BrowserWindow({ + width: 800, + height: 600, + }); + + win.loadFile("index.html"); +}; + +app.whenReady().then(() => { + createWindow(); +}); diff --git a/package.json b/package.json index cd761e4..0d1b54c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "electron", "version": "1.0.0", "description": "📖 An electron demo for study", - "main": "index.js", + "main": "main.js", "scripts": { "start": "electron .", "test": "echo \"Error: no test specified\" && exit 1"