mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-12 16:05:12 +08:00
添加了docs目录及其静态资源文件,支持前端文档和演示页面部署。新增dist-electron/main.js,实现Electron主进程窗口加载本地docs或开发服务器。更新.gitignore,允许docs目录纳入版本控制。
13 lines
466 B
JavaScript
13 lines
466 B
JavaScript
import { BrowserWindow, app } from "electron";
|
|
import path, { dirname } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
app.whenReady().then(() => {
|
|
let i = dirname(fileURLToPath(import.meta.url)), a = new BrowserWindow({
|
|
title: "OGame",
|
|
icon: path.join(i, "../public/favicon.ico"),
|
|
width: 1200,
|
|
height: 800
|
|
});
|
|
a.setMenu(null), process.env.VITE_DEV_SERVER_URL ? a.loadURL(process.env.VITE_DEV_SERVER_URL) : a.loadFile("docs/index.html");
|
|
});
|