Skip to content

Commit 0dad33c

Browse files
committed
update
1 parent fe7a74d commit 0dad33c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1532
-15
lines changed

hello-electron/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules/

hello-electron/index.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Hello World!</title>
6+
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';">
7+
</head>
8+
<body>
9+
<h1>Hello World!</h1>
10+
<p>
11+
We are using node <script>document.write(process.versions.node)</script>,
12+
Chrome <script>document.write(process.versions.chrome)</script>,
13+
and Electron <script>document.write(process.versions.electron)</script>.
14+
</p>
15+
</body>
16+
</html>

hello-electron/main.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { app, BrowserWindow } = require("electron");
2+
3+
function createWindow() {
4+
// Create the browser window
5+
const win = new BrowserWindow({
6+
width: 800,
7+
height: 600,
8+
webPreferences: {
9+
nodeIntegration: true,
10+
},
11+
});
12+
13+
win.loadFile("index.html");
14+
}
15+
16+
app.whenReady().then(createWindow);
17+
18+
app.on("window-all-closed", () => {
19+
app.quit();
20+
});

0 commit comments

Comments
 (0)