UNPKG

mixone

Version:

MixOne is a Node scaffolding tool implemented based on Vite, used for compiling HTML5, JavasCript, Vue, React and other codes. It supports packaging Web applications with multiple HTML entry points (BS architecture) and desktop installation packages (CS a

22 lines (19 loc) 577 B
const { app } = require('electron'); // 保持对窗口对象的全局引用 let mainWindow = null; // 当 Electron 完成初始化并准备创建浏览器窗口时调用此方法 app.whenReady().then(async () => { // 创建主窗口 mainWindow = await windowManager.openWindow('/'); }) // 当所有窗口关闭时退出应用 app.on('window-all-closed', () => { if (process.platform !== 'darwin') { app.quit(); } }); app.on('activate', async () => { if (mainWindow === null) { mainWindow = await windowManager.openWindow('/'); } });