mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-25 02:53:53 +03:00
4164b6279e
* d3tooltip * map2tree * d3-state-visualizer * react-base16-styling * react-dock * Cleanup * Update * react-json-tree * redux-devtools * redux-devtools-app * redux-devtools-app-core * redux-devtools-cli * Fix * redux-devtools-dock-monitor * redux-devtools-extension * redux-devtools-inspector-monitor * redux-devtools-inspector-monitor-test-tab * redux-devtools-inspector-monitor-trace-tab * redux-devtools-instrument * Simplify * redux-devtools-log-monitor * redux-devtools-remote * redux-devtools-rtk-query-monitor * redux-devtools-serialize * redux-devtools-slider-monitor * redux-devtools-utils * Format
30 lines
756 B
JavaScript
30 lines
756 B
JavaScript
// Based on https://github.com/electron/electron-quick-start
|
|
|
|
const { app, BrowserWindow } = require('electron');
|
|
const argv = require('minimist')(process.argv.slice(2));
|
|
|
|
function createWindow() {
|
|
const mainWindow = new BrowserWindow({
|
|
width: 800,
|
|
height: 600,
|
|
});
|
|
|
|
const port = argv.port ? argv.port : 8000;
|
|
const host = argv.host ? argv.host : 'localhost';
|
|
const protocol = argv.protocol ? argv.protocol : 'http';
|
|
|
|
mainWindow.loadURL(protocol + '://' + host + ':' + port);
|
|
}
|
|
|
|
app.whenReady().then(() => {
|
|
createWindow();
|
|
|
|
app.on('activate', function () {
|
|
if (BrowserWindow.getAllWindows().length === 0) createWindow();
|
|
});
|
|
});
|
|
|
|
app.on('window-all-closed', function () {
|
|
if (process.platform !== 'darwin') app.quit();
|
|
});
|