v0.0.2
This commit is contained in:
parent
d086c1d493
commit
0f1d41a991
30 changed files with 1013 additions and 1536 deletions
15
src/desktop/index.html
Normal file
15
src/desktop/index.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<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>
|
34
src/desktop/main.js
Normal file
34
src/desktop/main.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
import { app, BrowserWindow } from 'electron'
|
||||
|
||||
// import pkg from 'electron';
|
||||
// console.log("package ", pkg)
|
||||
// const { app, BrowserWindow } = pkg;
|
||||
|
||||
const createWindow = () => {
|
||||
const win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600
|
||||
})
|
||||
|
||||
//win.loadFile('index.html')
|
||||
win.loadFile('/Users/agurgul/projs/home/docs/artur.gurgul.pro/.build/index.html')
|
||||
}
|
||||
|
||||
app.whenReady().then(() => {
|
||||
createWindow()
|
||||
|
||||
app.on('activate', () => {
|
||||
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
||||
})
|
||||
})
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') app.quit()
|
||||
})
|
||||
|
||||
// REPL
|
||||
// { app } = await import('electron')
|
||||
|
||||
export function run() {
|
||||
console.log("running")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue