Added electron-devtools-installer

This commit is contained in:
Robin Van den Broeck
2016-09-22 18:16:12 +02:00
parent 66484e9f11
commit 85ae3c5af7
2 changed files with 62 additions and 0 deletions
@@ -0,0 +1,35 @@
/// <reference path="../github-electron/github-electron.d.ts" />
/// <reference path="electron-devtools-installer.d.ts" />
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)
.then((name) => console.log(`Added Extension: ${name}`))
.catch((err) => console.log('An error occurred: ', err));
installExtension(REACT_DEVELOPER_TOOLS)
.then((name) => console.log(`Added Extension: ${name}`))
.catch((err) => console.log('An error occurred: ', err));
installExtension(BACKBONE_DEBUGGER)
.then((name) => console.log(`Added Extension: ${name}`))
.catch((err) => console.log('An error occurred: ', err));
installExtension(JQUERY_DEBUGGER)
.then((name) => console.log(`Added Extension: ${name}`))
.catch((err) => console.log('An error occurred: ', err));
installExtension(ANGULARJS_BATARANG)
.then((name) => console.log(`Added Extension: ${name}`))
.catch((err) => console.log('An error occurred: ', err));
installExtension(VUEJS_DEVTOOLS)
.then((name) => console.log(`Added Extension: ${name}`))
.catch((err) => console.log('An error occurred: ', err));
installExtension(REDUX_DEVTOOLS)
.then((name) => console.log(`Added Extension: ${name}`))
.catch((err) => console.log('An error occurred: ', err));
installExtension(REACT_PERF)
.then((name) => console.log(`Added Extension: ${name}`))
.catch((err) => console.log('An error occurred: ', err));
@@ -0,0 +1,27 @@
// Type definitions for electron-devtools-installer v2.0.1
// Project: https://github.com/MarshallOfSound/electron-devtools-installer
// Definitions by: Robin Van den Broeck <https://github.com/gamesmaxed>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../es6-promise/es6-promise.d.ts" />
declare module "electron-devtools-installer" {
// Default installation function
export default function (extensionReference: any, forceDownload?: boolean): Promise<String>;
interface Extension {
id: string,
electron: string,
}
// Devtools themself
export const EMBER_INSPECTOR: Extension;
export const REACT_DEVELOPER_TOOLS: Extension;
export const BACKBONE_DEBUGGER: Extension;
export const JQUERY_DEBUGGER: Extension;
export const ANGULARJS_BATARANG: Extension;
export const VUEJS_DEVTOOLS: Extension;
export const REDUX_DEVTOOLS: Extension;
export const REACT_PERF: Extension;
}