mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Remove devtools installer
This commit is contained in:
parent
3f7b222def
commit
b86b09a38a
@ -9,7 +9,6 @@ import path from 'path';
|
||||
import electron from 'electron';
|
||||
import * as packageJSON from './package.json';
|
||||
import LocalStorage from './common/LocalStorage';
|
||||
import installExtension, {REACT_DEVELOPER_TOOLS} from 'electron-devtools-installer';
|
||||
|
||||
// Some useful helpers
|
||||
const IS_DEV = process.env.INSOMNIA_ENV === 'development';
|
||||
@ -39,8 +38,7 @@ const UPDATE_URLS = {
|
||||
|
||||
const DOWNLOAD_URL = 'http://download.insomnia.rest';
|
||||
|
||||
const localStoragePath = path.join(app.getPath('userData'), 'localStorage');
|
||||
const localStorage = new LocalStorage(localStoragePath);
|
||||
let localStorage = null;
|
||||
|
||||
let mainWindow = null;
|
||||
let hasPromptedForUpdates = false;
|
||||
@ -248,10 +246,16 @@ app.on('activate', (e, hasVisibleWindows) => {
|
||||
|
||||
// When the app is first launched
|
||||
app.on('ready', () => {
|
||||
initLocalStorage();
|
||||
createWindow();
|
||||
checkForUpdates();
|
||||
});
|
||||
|
||||
function initLocalStorage () {
|
||||
const localStoragePath = path.join(app.getPath('userData'), 'localStorage');
|
||||
localStorage = new LocalStorage(localStoragePath);
|
||||
}
|
||||
|
||||
function createWindow () {
|
||||
const zoomFactor = getZoomFactor();
|
||||
const {bounds, fullscreen} = getBounds();
|
||||
@ -511,10 +515,6 @@ function createWindow () {
|
||||
];
|
||||
|
||||
if (IS_DEV) {
|
||||
installExtension(REACT_DEVELOPER_TOOLS)
|
||||
.then((name) => console.log(`Added Extension: ${name}`))
|
||||
.catch((err) => console.log('An error occurred: ', err));
|
||||
|
||||
template.push({
|
||||
label: 'Developer',
|
||||
position: 'before=help',
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "insomnia",
|
||||
"version": "4.0.4",
|
||||
"version": "4.0.5",
|
||||
"productName": "Insomnia",
|
||||
"longName": "Insomnia REST Client",
|
||||
"description": "A simple and beautiful REST API client",
|
||||
|
@ -151,7 +151,6 @@
|
||||
"css-loader": "^0.23.1",
|
||||
"electron": "^1.4.10",
|
||||
"electron-builder": "^10.5.0",
|
||||
"electron-devtools-installer": "^2.0.1",
|
||||
"express": "^4.14.0",
|
||||
"file-loader": "^0.9.0",
|
||||
"jest": "^17.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user