replace electron-is-dev with app.isPackaged

This commit is contained in:
Rushikesh Tote 2022-04-12 17:23:39 +05:30
parent 124880d0b8
commit 03b1c2c090
5 changed files with 4 additions and 11 deletions

View file

@ -64,7 +64,6 @@
"@types/mime": "^2.0.3",
"@types/node": "^14.14.37",
"@types/promise-fs": "^2.1.1",
"electron-is-dev": "^2.0.0",
"electron-log": "^4.3.5",
"electron-reload": "^2.0.0-alpha.1",
"electron-store": "^8.0.1",

View file

@ -1,8 +1,7 @@
import { app, BrowserWindow, Menu, Tray, dialog, nativeImage } from 'electron';
import * as path from 'path';
import * as isDev from 'electron-is-dev';
import AppUpdater from './utils/appUpdater';
import { createWindow } from './utils/createWindow';
import { createWindow, isDev } from './utils/createWindow';
import setupIpcComs from './utils/ipcComms';
import { buildContextMenu, buildMenuBar } from './utils/menuUtil';
import initSentry from './utils/sentry';

View file

@ -1,5 +1,4 @@
import { app, BrowserWindow, nativeImage } from 'electron';
import * as isDev from 'electron-is-dev';
import * as path from 'path';
import { isAppQuitting } from '..';
import { addAllowOriginHeader } from './cors';
@ -68,3 +67,5 @@ export function createWindow(): BrowserWindow {
});
return mainWindow;
}
export const isDev = !app.isPackaged;

View file

@ -1,6 +1,5 @@
import * as Sentry from '@sentry/electron/dist/main';
import * as isDev from 'electron-is-dev';
import { isDev } from './createWindow';
const SENTRY_DSN = 'https://e9268b784d1042a7a116f53c58ad2165@sentry.ente.io/5';

View file

@ -1301,11 +1301,6 @@ electron-download@^4.1.1:
semver "^5.4.1"
sumchecker "^2.0.2"
electron-is-dev@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-2.0.0.tgz"
integrity sha512-3X99K852Yoqu9AcW50qz3ibYBWY79/pBhlMCab8ToEWS48R0T9tyxRiQhwylE7zQdXrMnx2JKqUJyMPmt5FBqA==
electron-log@^4.3.5:
version "4.3.5"
resolved "https://registry.npmjs.org/electron-log/-/electron-log-4.3.5.tgz"