Skip to content
Snippets Groups Projects
Commit d4f882b4 authored by ali asaria's avatar ali asaria
Browse files

enable react developer tools if development mode is on

parent deb8ab82
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,10 @@ import { ...@@ -30,6 +30,10 @@ import {
getLogFilePath, getLogFilePath,
} from './util'; } from './util';
import installExtension, {
REACT_DEVELOPER_TOOLS,
} from 'electron-devtools-installer';
const fs = require('fs'); const fs = require('fs');
const Tail = require('tail').Tail; const Tail = require('tail').Tail;
...@@ -414,6 +418,13 @@ app ...@@ -414,6 +418,13 @@ app
.then(() => { .then(() => {
createWindow(); createWindow();
if (isDebug) {
console.log('installing react dev tools');
installExtension(REACT_DEVELOPER_TOOLS)
.then((name) => console.log(`Added Extension: ${name}`))
.catch((err) => console.log('An error occurred: ', err));
}
app.on('activate', () => { app.on('activate', () => {
// On macOS it's common to re-create a window in the app when the // On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open. // dock icon is clicked and there are no other windows open.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment