Initialisation du projet : Electron + Vite + React + TypeScript, Vitest, CI Windows
Some checks are pending
CI / windows (push) Waiting to run

This commit is contained in:
yasder5 2026-09-27 15:12:08 +02:00
commit afb305b3e8
15 changed files with 6166 additions and 0 deletions

26
src/main/index.ts Normal file
View file

@ -0,0 +1,26 @@
import { join } from 'node:path'
import { app, BrowserWindow } from 'electron'
function createWindow(): BrowserWindow {
const win = new BrowserWindow({
width: 1600,
height: 900,
fullscreen: !process.env.ELECTRON_RENDERER_URL,
backgroundColor: '#0a0a0a',
autoHideMenuBar: true,
show: false,
webPreferences: {
preload: join(__dirname, '../preload/index.js'),
contextIsolation: true,
nodeIntegration: false,
sandbox: true
}
})
win.once('ready-to-show', () => win.show())
if (process.env.ELECTRON_RENDERER_URL) win.loadURL(process.env.ELECTRON_RENDERER_URL)
else win.loadFile(join(__dirname, '../renderer/index.html'))
return win
}
app.whenReady().then(createWindow)
app.on('window-all-closed', () => app.quit())