Skip to content

The swiss army knife of lossless video/audio editing

add devtools

Mikael Finstad6f1fc6ffe892
diff --git a/package.json b/package.json
index 92bff3d2..7f82f40e 100644
--- a/package.json
+++ b/package.json
@@ -42,6 +42,7 @@
"electron": "^8.0.0",
"electron-builder": "^22.3.2",
"electron-builder-notarize": "^1.1.2",
+ "electron-devtools-installer": "^2.2.4",
"eslint": "^5.16.0 || ^6.1.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-plugin-import": "^2.18.2",
diff --git a/src/index.js b/src/index.js
index f333a05b..6b1ff7b5 100644
--- a/src/index.js
+++ b/src/index.js
@@ -27,6 +27,18 @@ function createWindow() {
});
mainWindow.loadFile(isDev ? 'index.html' : 'build/index.html');
+ if (isDev) {
+ const { default: installExtension, REACT_DEVELOPER_TOOLS } = require('electron-devtools-installer'); // eslint-disable-line global-require,import/no-extraneous-dependencies
+
+ installExtension(REACT_DEVELOPER_TOOLS)
+ .then(name => console.log(`Added Extension: ${name}`))
+ .catch(err => console.log('An error occurred: ', err));
+ }
+
+ // Open the DevTools.
+ // mainWindow.webContents.openDevTools()
+
+
mainWindow.on('closed', () => {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time