mirror of
https://github.com/danog/code-server.git
synced 2024-12-14 18:28:13 +01:00
be3e823608
git-subtree-dir: lib/vscode git-subtree-split: e5a624b788d92b8d34d1392e4c4d9789406efe8f
21 lines
960 B
JavaScript
21 lines
960 B
JavaScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
const { app, BrowserWindow } = require('electron');
|
|
const url = require('url');
|
|
const path = require('path');
|
|
|
|
let window = null;
|
|
|
|
app.once('ready', () => {
|
|
window = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, webviewTag: true, enableWebSQL: false, nativeWindowOpen: true } });
|
|
window.setMenuBarVisibility(false);
|
|
window.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), protocol: 'file:', slashes: true }));
|
|
// window.webContents.openDevTools();
|
|
window.once('closed', () => window = null);
|
|
});
|
|
|
|
app.on('window-all-closed', () => app.quit());
|