Skip to content

Commit

Permalink
electron-is-dev is now useless, use our own copy.
Browse files Browse the repository at this point in the history
  • Loading branch information
dscalzi committed Sep 23, 2018
1 parent b2e9223 commit 3acc213
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/assets/js/assetguard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -31,6 +30,7 @@ const zlib = require('zlib')

const ConfigManager = require('./configmanager')
const DistroManager = require('./distromanager')
const isDev = require('./isdev')

// Constants
const PLATFORM_MAP = {
Expand Down
5 changes: 5 additions & 0 deletions app/assets/js/isdev.js
Original file line number Diff line number Diff line change
@@ -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))
2 changes: 1 addition & 1 deletion app/assets/js/scripts/uicore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
5 changes: 0 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3acc213

Please sign in to comment.