Skip to content

akameco/electron-load-devtool

Repository files navigation

electron-load-devtool

Build Status All Contributors

Easily Load devtools-extension for electron

why?

Electron supports the Chrome DevTools Extension. But, it's a very bother. This module can load simply for your development environment. And, support some devtool-extensions like redux-devtools by default.

Install

$ npm install --save-dev electron-load-devtool

Usage

const electron = require('electron')
const loadDevtool = require('electron-load-devtool')

electron.app.on('ready', () => {
  const win = new electron.BrowserWindow({ width: 400, height: 400 })
  win.loadURL(`file://${__dirname}/index.html`)

  loadDevtool(loadDevtool.REDUX_DEVTOOLS)

  win.openDevTools()
})

API

loadDevtool(devtoolId, [options])

devtoolId

Type: string

options

enabled

Type: boolean

Only runs when in development, unless overridden by the enabled option. So no need to guard it for production.

name

Type: string
Default: google-chrome

If you using chromium on Linux, set chromium.

profile

Type: string
Default: Default

Specific Chrome Profile name.

version

Type: string
Default: latest

Specific devtools-extension version.

loadDevtool.REDUX_DEVTOOLS

loadDevtool.EMBER_INSPECTOR

loadDevtool.REACT_DEVELOPER_TOOLS

loadDevtool.BACKBONE_DEBUGGER

loadDevtool.JQUERY_DEBUGGER

loadDevtool.ANGULARJS_BATARANG

loadDevtool.VUEJS_DEVTOOLS

loadDevtool.VUEJS_DEVTOOLS_BETA

Contributors

Thanks goes to these wonderful people (emoji key):


akameco

💻 📖 🚇

mactkg

💻

Jasper Poppe

💻

Yoshiyuki Kinjo

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © akameco

About

Easily load dev tool for electron

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •