From 65741ec137dab12f23d6601f5c807186a9434c00 Mon Sep 17 00:00:00 2001 From: shixh4 Date: Mon, 30 Jan 2023 16:15:29 +0800 Subject: [PATCH] feat:init --- index.html | 15 +++++++++++++++ main.js | 15 +++++++++++++++ package.json | 14 ++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 index.html create mode 100644 main.js create mode 100644 package.json 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 ." + } +}