electron-is-dev is now useless, use our own copy.

This commit is contained in:
Daniel Scalzi 2018-09-23 02:19:16 -04:00
parent b2e9223b10
commit 3acc213544
No known key found for this signature in database
GPG Key ID: 5CA2F145B63535F9
6 changed files with 8 additions and 9 deletions

View File

@ -21,7 +21,6 @@ const child_process = require('child_process')
const crypto = require('crypto')
const EventEmitter = require('events')
const fs = require('fs')
const isDev = require('electron-is-dev')
const mkpath = require('mkdirp')
const path = require('path')
const Registry = require('winreg')
@ -31,6 +30,7 @@ const zlib = require('zlib')
const ConfigManager = require('./configmanager')
const DistroManager = require('./distromanager')
const isDev = require('./isdev')
// Constants
const PLATFORM_MAP = {

5
app/assets/js/isdev.js Normal file
View File

@ -0,0 +1,5 @@
'use strict'
const getFromEnv = parseInt(process.env.ELECTRON_IS_DEV, 10) === 1
const isEnvSet = 'ELECTRON_IS_DEV' in process.env
module.exports = isEnvSet ? getFromEnv : (process.defaultApp || /node_modules[\\/]electron[\\/]/.test(process.execPath))

View File

@ -7,7 +7,7 @@
// Requirements
const $ = require('jquery')
const {ipcRenderer, remote, shell, webFrame} = require('electron')
const isDev = require('electron-is-dev')
const isDev = require('./assets/js/isdev')
const LoggerUtil = require('./assets/js/loggerutil')
const loggerUICore = LoggerUtil('%c[UICore]', 'color: #000668; font-weight: bold')

View File

@ -3,7 +3,7 @@ const {app, BrowserWindow, ipcMain} = require('electron')
const autoUpdater = require('electron-updater').autoUpdater
const ejse = require('ejs-electron')
const fs = require('fs')
const isDev = require('electron-is-dev')
const isDev = require('./app/assets/js/isdev')
const path = require('path')
const semver = require('semver')
const url = require('url')

5
package-lock.json generated
View File

@ -993,11 +993,6 @@
}
}
},
"electron-is-dev": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-0.3.0.tgz",
"integrity": "sha1-FOb9pcaOnk7L7/nM8DfL18BcWv4="
},
"electron-osx-sign": {
"version": "0.4.10",
"resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.4.10.tgz",

View File

@ -36,7 +36,6 @@
"discord-rpc": "^3.0.0",
"ejs": "^2.6.1",
"ejs-electron": "^2.0.3",
"electron-is-dev": "=0.3.0",
"electron-updater": "^3.1.2",
"github-syntax-dark": "^0.5.0",
"jquery": "^3.3.1",