1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-24 04:04:24 +00:00

Move CLI to apps/cli

This commit is contained in:
Hinton
2022-05-25 10:56:29 +02:00
parent f6c454c970
commit 980429f4bd
103 changed files with 2 additions and 2 deletions

31
apps/cli/config/config.js Normal file
View File

@@ -0,0 +1,31 @@
/* eslint-disable no-console */
function load(envName) {
return {
...loadConfig(envName),
...loadConfig("local"),
};
}
function log(configObj) {
const repeatNum = 50;
console.log(`${"=".repeat(repeatNum)}\nenvConfig`);
console.log(JSON.stringify(configObj, null, 2));
console.log(`${"=".repeat(repeatNum)}`);
}
function loadConfig(configName) {
try {
return require(`./${configName}.json`);
} catch (e) {
if (e instanceof Error && e.code === "MODULE_NOT_FOUND") {
return {};
} else {
throw e;
}
}
}
module.exports = {
load,
log,
};

View File

@@ -0,0 +1,5 @@
{
"flags": {
"serve": true
}
}

View File

@@ -0,0 +1,5 @@
{
"flags": {
"serve": true
}
}