mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
* Use ssh for git regexr dependency * remove .git from dep * update * update test * update step * update install * remove dep temporarily * remove extra change * move deps to specific test
32 lines
625 B
JavaScript
32 lines
625 B
JavaScript
const { join } = require('path')
|
|
const { app, BrowserWindow } = require('electron')
|
|
const url = require('url')
|
|
|
|
function createWindow() {
|
|
const mainWindow = new BrowserWindow({
|
|
width: 800,
|
|
height: 600,
|
|
webPreferences: {
|
|
nodeIntegration: false,
|
|
},
|
|
})
|
|
mainWindow.loadURL(
|
|
url.format({
|
|
pathname: join(__dirname, 'index.html'),
|
|
protocol: 'file:',
|
|
slashes: true,
|
|
})
|
|
)
|
|
}
|
|
|
|
app.whenReady().then(() => {
|
|
createWindow()
|
|
app.on('activate', () => {
|
|
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
|
})
|
|
})
|
|
|
|
app.on('window-all-closed', () => {
|
|
app.quit()
|
|
})
|