electron-debug
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -71,4 +71,11 @@ import {BrowserWindow} from 'electron'; | ||
openDevTools(window?: BrowserWindow): void; | ||
/** | ||
The absolute path to a preload script to use in [`session#setPreloads()`](https://www.electronjs.org/docs/api/session#sessetpreloadspreloads). | ||
Use it to enable `devtron` even when [`nodeIntegration`](https://www.electronjs.org/docs/api/browser-window#new-browserwindowoptions) is turned off. | ||
*/ | ||
preloadScriptPath: string; | ||
}; | ||
export = electronDebug; |
'use strict'; | ||
const {app, BrowserWindow, session} = require('electron'); | ||
const path = require('path'); | ||
const localShortcut = require('electron-localshortcut'); | ||
@@ -123,1 +124,2 @@ const isDev = require('electron-is-dev'); | ||
module.exports.openDevTools = openDevTools; | ||
module.exports.preloadScriptPath = path.join(__dirname, 'preload.js'); |
{ | ||
"name": "electron-debug", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "Adds useful debug features to your Electron app", | ||
@@ -19,3 +19,4 @@ "license": "MIT", | ||
"index.js", | ||
"index.d.ts" | ||
"index.d.ts", | ||
"preload.js" | ||
], | ||
@@ -22,0 +23,0 @@ "keywords": [ |
@@ -36,2 +36,3 @@ # electron-debug | ||
- [devtron](https://electronjs.org/devtron) - The official Electron DevTools extension | ||
- You need to use [`preloadScriptPath`](#preloadScriptPath) if the `BrowserWindow`'s `nodeIntegration` is off. | ||
- [electron-react-devtools](https://github.com/firejune/electron-react-devtools) - React DevTools extension for Electron | ||
@@ -120,2 +121,10 @@ | ||
### preloadScriptPath | ||
Type: `string` | ||
The absolute path to a preload script to use in [`session#setPreloads()`](https://www.electronjs.org/docs/api/session#sessetpreloadspreloads). | ||
Use it to enable `devtron` even when [`nodeIntegration`](https://www.electronjs.org/docs/api/browser-window#new-browserwindowoptions) is turned off. | ||
## Related | ||
@@ -122,0 +131,0 @@ |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
11166
6
167
138
4