mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Remove redundance LOKI_DEV variable in scripts
This commit is contained in:
parent
b97a68c7f6
commit
3f5a8e7b1b
|
@ -1,12 +1,14 @@
|
|||
const path = require('path');
|
||||
|
||||
const electronIsDev = require('electron-is-dev');
|
||||
const isDevelopment = require('electron-is-dev');
|
||||
|
||||
let environment;
|
||||
|
||||
// In production mode, NODE_ENV cannot be customized by the user
|
||||
if (electronIsDev) {
|
||||
if (isDevelopment) {
|
||||
console.log('development');
|
||||
environment = process.env.NODE_ENV || 'development';
|
||||
process.env.LOKI_DEV = 1;
|
||||
} else {
|
||||
environment = 'production';
|
||||
}
|
||||
|
@ -23,7 +25,9 @@ if (environment === 'production') {
|
|||
process.env.ALLOW_CONFIG_MUTATIONS = '';
|
||||
process.env.SUPPRESS_NO_CONFIG_WARNING = '';
|
||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '';
|
||||
if (!process.env.LOKI_DEV) {
|
||||
|
||||
// We could be running againt production but still be in dev mode, we need to handle that
|
||||
if (!isDevelopment) {
|
||||
process.env.NODE_APP_INSTANCE = '';
|
||||
}
|
||||
}
|
||||
|
@ -39,9 +43,6 @@ config.environment = environment;
|
|||
'NODE_APP_INSTANCE',
|
||||
'NODE_CONFIG_DIR',
|
||||
'NODE_CONFIG',
|
||||
'ALLOW_CONFIG_MUTATIONS',
|
||||
'HOSTNAME',
|
||||
'SUPPRESS_NO_CONFIG_WARNING',
|
||||
].forEach(s => {
|
||||
console.log(`${s} ${config.util.getEnv(s)}`);
|
||||
});
|
||||
|
|
|
@ -57,7 +57,6 @@ module.exports = {
|
|||
env: {
|
||||
NODE_APP_INSTANCE: env,
|
||||
NODE_ENV: 'production',
|
||||
LOKI_DEV: 1,
|
||||
USE_STUBBED_NETWORK: true,
|
||||
ELECTRON_ENABLE_LOGGING: true,
|
||||
ELECTRON_ENABLE_STACK_DUMPING: true,
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
"start": "electron .",
|
||||
"start-multi": "cross-env NODE_APP_INSTANCE=1 electron .",
|
||||
"start-multi2": "cross-env NODE_APP_INSTANCE=2 electron .",
|
||||
"start-prod": "cross-env NODE_ENV=production NODE_APP_INSTANCE=devprod LOKI_DEV=1 electron .",
|
||||
"start-prod-multi": "cross-env NODE_ENV=production NODE_APP_INSTANCE=devprod1 LOKI_DEV=1 electron .",
|
||||
"start-swarm-test": "cross-env NODE_ENV=swarm-testing NODE_APP_INSTANCE=1 LOKI_DEV=1 electron .",
|
||||
"start-swarm-test-2": "cross-env NODE_ENV=swarm-testing NODE_APP_INSTANCE=2 LOKI_DEV=1 electron .",
|
||||
"start-prod": "cross-env NODE_ENV=production NODE_APP_INSTANCE=devprod electron .",
|
||||
"start-prod-multi": "cross-env NODE_ENV=production NODE_APP_INSTANCE=devprod1 electron .",
|
||||
"start-swarm-test": "cross-env NODE_ENV=swarm-testing NODE_APP_INSTANCE=1 electron .",
|
||||
"start-swarm-test-2": "cross-env NODE_ENV=swarm-testing NODE_APP_INSTANCE=2 electron .",
|
||||
"grunt": "grunt",
|
||||
"icon-gen": "electron-icon-maker --input=images/icon_1024.png --output=./build",
|
||||
"generate": "yarn icon-gen && yarn grunt",
|
||||
|
|
Loading…
Reference in a new issue