1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-21 11:35:34 +01:00

Use settings in base.json and merge config keys (#3804)

This commit is contained in:
Thomas Rittson 2022-10-18 12:00:40 +10:00 committed by GitHub
parent fcd388e888
commit 04aebbc3bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 54 additions and 10 deletions

View File

@ -1,7 +1,22 @@
function load(envName) {
const base = loadConfig("base");
const env = loadConfig(envName);
const local = loadConfig("local");
return {
...loadConfig(envName),
...loadConfig("local"),
...base,
...env,
...local,
flags: {
...base.flags,
...env.flags,
...local.flags,
},
devFlags: {
...base.devFlags,
...env.devFlags,
...local.devFlags,
},
};
}

View File

@ -1,7 +1,22 @@
function load(envName) {
const base = loadConfig("base");
const env = loadConfig(envName);
const local = loadConfig("local");
return {
...loadConfig(envName),
...loadConfig("local"),
...base,
...env,
...local,
flags: {
...base.flags,
...env.flags,
...local.flags,
},
devFlags: {
...base.devFlags,
...env.devFlags,
...local.devFlags,
},
};
}

View File

@ -1,12 +1,26 @@
function load(envName) {
const base = require("./config/base.json");
const env = loadConfig(envName);
const local = loadConfig("local");
return {
...require("./config/base.json"),
...loadConfig(envName),
...loadConfig("local"),
...base,
...env,
...local,
dev: {
...require("./config/base.json").dev,
...loadConfig(envName).dev,
...loadConfig("local").dev,
...base.dev,
...env.dev,
...local.dev,
},
flags: {
...base.flags,
...env.flags,
...local.flags,
},
devFlags: {
...base.devFlags,
...env.devFlags,
...local.devFlags,
},
};
}