Use development env
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
"start": "electron .",
|
||||
"test": "yarn run test-backend",
|
||||
"install": "cd app && yarn && cd ..",
|
||||
"dev": "electron . --development",
|
||||
"build": "tsc && cd app && yarn run build && cd ..",
|
||||
"test-backend": "cd backend && yarn run test && cd ..",
|
||||
"prepare-release": "ts-node scripts/prepare-release.ts",
|
||||
@@ -53,7 +54,7 @@
|
||||
"author": "Thomas Nordquist",
|
||||
"email": "xxnerowingerxx@gmail.com",
|
||||
"homepage": "https://github.com",
|
||||
"license": "-",
|
||||
"license": "CC-BY-ND-4.0",
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.1.7",
|
||||
"@types/fs-extra": "^5.0.5",
|
||||
@@ -89,7 +90,6 @@
|
||||
"dependencies": {
|
||||
"@types/js-base64": "^2.3.1",
|
||||
"about-window": "^1.12.1",
|
||||
"electron-is-dev": "^1.0.1",
|
||||
"electron-log": "^2.2.17",
|
||||
"electron-telemetry": "git+https://github.com/thomasnordquist/electron-telemetry.git#dist",
|
||||
"electron-updater": "^4.0.6",
|
||||
|
||||
@@ -9,19 +9,17 @@ import { ConnectionManager, updateNotifier } from '../backend/src/index'
|
||||
import { electronTelemetryFactory } from 'electron-telemetry'
|
||||
import { menuTemplate } from './MenuTemplate'
|
||||
import { UpdateInfo } from '../events'
|
||||
const isDev = require('electron-is-dev')
|
||||
|
||||
const isDev = Boolean(process.argv.find(arg => arg === '--development'))
|
||||
|
||||
if (!isDev) {
|
||||
let buildOptions: BuildInfo = ({ platform: 'unknown', package: 'unknown' } as any)
|
||||
|
||||
let buildOptions: BuildInfo = ({ platform: process.platform, package: 'unpacked' } as any)
|
||||
try {
|
||||
const options = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '..', 'buildOptions.json')).toString())
|
||||
if (typeof options.platform === 'string' && typeof options.package === 'string') {
|
||||
buildOptions = options
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
} catch (ignore) {}
|
||||
|
||||
console.log(buildOptions)
|
||||
const electronTelemetry = electronTelemetryFactory('9b0c8ca04a361eb8160d98c5', buildOptions)
|
||||
|
||||
@@ -1199,11 +1199,6 @@ electron-download@^4.1.0:
|
||||
semver "^5.4.1"
|
||||
sumchecker "^2.0.2"
|
||||
|
||||
electron-is-dev@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/electron-is-dev/-/electron-is-dev-1.0.1.tgz#6e0a184736fe7aea77d18210b0b0f6a02402c4bc"
|
||||
integrity sha512-iwM3EotA9HTXqMGpQRkR/kT8OZqBbdfHTnlwcxsjSLYqY8svvsq0MuujsWCn3/vtgRmDv/PC/gKUUpoZvi5C1w==
|
||||
|
||||
electron-log@^2.2.17:
|
||||
version "2.2.17"
|
||||
resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-2.2.17.tgz#e71e2ebb949fc96ded7cdb99eeee7202e48981d2"
|
||||
|
||||
Reference in New Issue
Block a user