How to use the electron-devtools-installer function in electron-devtools-installer

To help you get started, we’ve selected a few electron-devtools-installer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github csprance / MisRCON / src / index.ts View on Github external
width: 1024
  };
  // configure the splashscreen
  mainWindow = Splashscreen.initSplashScreen({
    splashScreenOpts: {
      height: 400,
      transparent: true,
      width: 400
    },
    templateUrl: path.join(__dirname, 'resources', 'images', 'icon.png'),
    windowOpts: windowOptions
  });

  // Open the DevTools.
  if (isDev) {
    await installExtension(REDUX_DEVTOOLS);
    await installExtension(REACT_DEVELOPER_TOOLS);
    mainWindow.webContents.openDevTools();
  }

  // and load the index.html of the appState.
  mainWindow.loadURL(`file://${__dirname}/index.html`);

  mainWindow.on('closed', () => {
    mainWindow = null;
    logger.info('closed');
    app.quit();
  });

  mainWindow.on('unresponsive', () => {
    mainWindow = null;
    logger.info('unresponsive');
github blockchain-desktop / hyperledger-fabric-desktop / src / index.js View on Github external
mainWindow = new BrowserWindow({
      icon: path.join(__dirname, '../resources/styles/image/logo/logo.iconset/icon_512x512.png'),
      width: 860,
      height: 750,
      minWidth: 860,
      minHeight: 680,
      backgroundColor: '#fff',
    });
  }

  // and load the index.html of the app.
  mainWindow.loadURL(`file://${__dirname}/index.html`);

  // Open the DevTools.
  if (isDevMode) {
    await installExtension(REACT_DEVELOPER_TOOLS);
    mainWindow.webContents.openDevTools();
  }
  if (!isDevMode && process.platform === 'darwin') {
    // Create the Application's main menu
    const template = [{
      label: 'Application',
      submenu: [
        { label: 'About Application', selector: 'orderFrontStandardAboutPanel:' },
        { type: 'separator' },
        { label: 'Quit', accelerator: 'Command+Q', click() { app.quit(); } },
      ] }, {
      label: 'Edit',
      submenu: [
        { label: 'Undo', accelerator: 'CmdOrCtrl+Z', selector: 'undo:' },
        { label: 'Redo', accelerator: 'Shift+CmdOrCtrl+Z', selector: 'redo:' },
        { type: 'separator' },
github mmick66 / jswallet / src / index.js View on Github external
const createWindow = async () => {

    // Create the browser window.
    mainWindow = new BrowserWindow({
        width: 800,
        height: 600,
    });

    // and load the index.html of the app.
    mainWindow.loadURL(`file://${__dirname}/index.html`);

    // Open the DevTools.
    if (isDevMode) {
        await installExtension(REACT_DEVELOPER_TOOLS);
        // mainWindow.webContents.openDevTools();
    }

    // Emitted when the window is closed.
    mainWindow.on('closed', () => {
        // Dereference the window object, usually you would store windows
        // in an array if your app supports multi windows, this is the time
        // when you should delete the corresponding element.
        mainWindow = null;
    });
};
github lazerwalker / tracery-dot-app / src / createWindow.ts View on Github external
return new Promise(async (resolve, reject) => {
    // Create the browser window.
    let window = new BrowserWindow({
      width: 800,
      height: 600,
      webPreferences: { scrollBounce: true }
    });

    windows.push(window);

    // and load the index.html of the app.
    window.loadURL(`file://${__dirname}/index.html`);

    // Open the DevTools.
    if (isDevMode) {
      await installExtension(REACT_DEVELOPER_TOOLS);
      window.webContents.openDevTools();
    }

    // Emitted when the window is closed.
    window.on('closed', () => {
      // Dereference the window object, usually you would store windows
      // in an array if your app supports multi windows, this is the time
      // when you should delete the corresponding element.
      windows = _.without(windows, window);
    });

    buildAndSetMenu(options, window);

    resolve(window);
  });
};
github DefinitelyTyped / DefinitelyTyped / types / electron-devtools-installer / electron-devtools-installer-tests.ts View on Github external
import installExtension, {
    EMBER_INSPECTOR, REACT_DEVELOPER_TOOLS,
    BACKBONE_DEBUGGER, JQUERY_DEBUGGER,
    ANGULARJS_BATARANG, VUEJS_DEVTOOLS,
    REDUX_DEVTOOLS, REACT_PERF,
} from 'electron-devtools-installer';


installExtension(EMBER_INSPECTOR);
installExtension(REACT_DEVELOPER_TOOLS);
installExtension(BACKBONE_DEBUGGER);
installExtension(JQUERY_DEBUGGER);
installExtension(ANGULARJS_BATARANG);
installExtension(VUEJS_DEVTOOLS);
installExtension(REDUX_DEVTOOLS);
installExtension(REACT_PERF);
installExtension('abcdefghijkl');
github Figma-Linux / figma-linux / src / main / WindowManager.ts View on Github external
private devtools = () => {
		installExtension(REACT_DEVELOPER_TOOLS)
			.then((name) => console.log(`Added Extension:  ${name}`))
			.catch((err) => console.log('An error occurred: ', err));
	}
}
github forCandies / googlePhotosDesktop / src / core / Window.ts View on Github external
protected async create(): Promise
	{
		this.loadURL(Window.getUrl());

		if (isDev) {
			await installExtension(REACT_DEVELOPER_TOOLS);
		}
	}
github Nexusoft / NexusInterface / src / main / renderer.js View on Github external
function installExtensions() {
  const forceDownload = !!process.env.UPGRADE_EXTENSIONS;
  return Promise.all([
    devToolsInstall(REACT_DEVELOPER_TOOLS, forceDownload),
    devToolsInstall(REDUX_DEVTOOLS, forceDownload),
  ]);
}
github poooi / poi / lib / devtool.es View on Github external
import installExtension, { REACT_DEVELOPER_TOOLS } from 'electron-devtools-installer'

import { log, error } from './utils'

installExtension(REACT_DEVELOPER_TOOLS)
  .then(name => log('React Devtool is added'))
  .catch(err => error('An error occurred: ', err))
github Nexusoft / NexusInterface / src / main / renderer.js View on Github external
function installExtensions() {
  const forceDownload = !!process.env.UPGRADE_EXTENSIONS;
  return Promise.all([
    devToolsInstall(REACT_DEVELOPER_TOOLS, forceDownload),
    devToolsInstall(REDUX_DEVTOOLS, forceDownload),
  ]);
}