Files
plugin-manager/test/electron/main.js

28 lines
702 B
JavaScript

const { app, BrowserWindow } = require('electron');
const path = require('path');
/**
* Creates the main application window.
* nodeIntegration is enabled so the renderer can use require() / dynamic import()
* directly against the local node_modules — appropriate for a local test harness.
*/
function createWindow() {
const win = new BrowserWindow({
width: 1200,
height: 800,
backgroundColor: '#1a1a2e',
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
},
});
win.loadFile(path.join(__dirname, 'index.html'));
}
app.whenReady().then(createWindow);
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit();
});