Init node proj.

This commit is contained in:
2025-08-05 23:30:00 +08:00
parent bdaa4ea9b8
commit 50bfdfbbe9
14 changed files with 2412 additions and 0 deletions

25
main/main.js Normal file
View File

@ -0,0 +1,25 @@
const { app, BrowserWindow } = require('electron')
const path = require('path')
let mainWindow
function createWindow() {
mainWindow = new BrowserWindow({
width: 300,
height: 300,
transparent: true,
frame: false,
webPreferences: {
preload: path.join(__dirname, '../renderer/src/preload.js'),
contextIsolation: true
}
})
mainWindow.loadURL(
process.env.NODE_ENV === 'development'
? 'http://localhost:5173'
: `file://${path.join(__dirname, '../renderer/dist/index.html')}`
)
}
app.whenReady().then(createWindow)