commit 65741ec137dab12f23d6601f5c807186a9434c00 Author: shixh4 Date: Mon Jan 30 16:15:29 2023 +0800 feat:init diff --git a/index.html b/index.html new file mode 100644 index 0000000..83c11ef --- /dev/null +++ b/index.html @@ -0,0 +1,15 @@ + + + + + + + Hello World! + + +

Hello World!

+ We are using Node.js , + Chromium , + and Electron . + + \ No newline at end of file diff --git a/main.js b/main.js new file mode 100644 index 0000000..312c676 --- /dev/null +++ b/main.js @@ -0,0 +1,15 @@ +// npm start +const { app, BrowserWindow } = require('electron') + +const createWindow = () => { + const win = new BrowserWindow({ + width: 800, + height: 600 + }) + + win.loadFile('index.html') +} + +app.whenReady().then(() => { + createWindow() +}) \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..1bbed09 --- /dev/null +++ b/package.json @@ -0,0 +1,14 @@ +{ + "name": "my-electron-app", + "version": "1.0.0", + "description": "Hello World!", + "main": "main.js", + "author": "hua", + "license": "MIT", + "devDependencies": { + "electron": "^22.1.0" + }, + "scripts": { + "start": "electron ." + } +}