Skip to content

Commit

Permalink
Add devtron and electron-react-devtools (#227)
Browse files Browse the repository at this point in the history
* add electron-react-devtools
* Add devtron
* Use electron-devtools-installer to install React Devtools
* Upgrade electron-devtools-installer to 1.1.2 (automatically handles not installing the same extension twice)
* Update electron-debug
  • Loading branch information
davej authored and jhen0409 committed Jun 19, 2016
1 parent b64d59a commit a322be3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
<div id="root"></div>
<script>
(function() {
if (process.env.NODE_ENV === 'development') {
const devtoolsInstaller = require('electron-devtools-installer');
devtoolsInstaller.default(devtoolsInstaller.REACT_DEVELOPER_TOOLS).catch(() => {});
}

const script = document.createElement('script');
script.src = (process.env.HOT) ? 'http://localhost:3000/dist/bundle.js' : '../dist/bundle.js';
document.write(script.outerHTML);
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@
"cross-env": "^1.0.8",
"css-loader": "^0.23.1",
"del": "^2.2.0",
"devtron": "^1.2.0",
"electron-devtools-installer": "^1.1.2",
"electron-packager": "^7.0.2",
"electron-prebuilt": "^1.2.0",
"electron-prebuilt": "^1.2.3",
"electron-rebuild": "^1.1.4",
"eslint": "^2.10.2",
"eslint-config-airbnb": "^9.0.1",
Expand Down Expand Up @@ -101,7 +103,7 @@
},
"dependencies": {
"css-modules-require-hook": "^4.0.0",
"electron-debug": "^1.0.0",
"electron-debug": "^1.0.1",
"font-awesome": "^4.6.3",
"postcss": "^5.0.21",
"react": "^15.1.0",
Expand Down

0 comments on commit a322be3

Please sign in to comment.