electron-load-devtool
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/electron-load-devtool package

1.2.0 • Public • Published

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

Package Sidebar

Install

npm i electron-load-devtool

Weekly Downloads

62

Version

1.2.0

License

MIT

Unpacked Size

8.8 kB

Total Files

5

Last publish

Collaborators

  • akameco