Add React Developer Tools
This commit is contained in:
@@ -12,6 +12,7 @@ const {
|
||||
session
|
||||
} = require('electron');
|
||||
const isDev = require('electron-is-dev');
|
||||
const installExtension = require('electron-devtools-installer');
|
||||
|
||||
const AutoLaunch = require('auto-launch');
|
||||
|
||||
@@ -315,6 +316,12 @@ app.on('ready', () => {
|
||||
if (willAppQuit) {
|
||||
return;
|
||||
}
|
||||
if (global.isDev) {
|
||||
installExtension.default(installExtension.REACT_DEVELOPER_TOOLS).
|
||||
then((name) => console.log(`Added Extension: ${name}`)).
|
||||
catch((err) => console.log('An error occurred: ', err));
|
||||
}
|
||||
|
||||
ipcMain.on('notified', () => {
|
||||
if (process.platform === 'win32' || process.platform === 'linux') {
|
||||
if (config.notifications.flashWindow === 2) {
|
||||
|
@@ -15,6 +15,7 @@
|
||||
"auto-launch": "^5.0.1",
|
||||
"bootstrap": "^3.3.7",
|
||||
"electron-context-menu": "^0.8.0",
|
||||
"electron-devtools-installer": "^2.1.0",
|
||||
"electron-is-dev": "^0.1.2",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"os-locale": "^2.0.0",
|
||||
|
Reference in New Issue
Block a user