feat:init
This commit is contained in:
commit
65741ec137
|
@ -0,0 +1,15 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
|
||||||
|
<title>Hello World!</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Hello World!</h1>
|
||||||
|
We are using Node.js <span id="node-version"></span>,
|
||||||
|
Chromium <span id="chrome-version"></span>,
|
||||||
|
and Electron <span id="electron-version"></span>.
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -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()
|
||||||
|
})
|
|
@ -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 ."
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue