forked from streetwriters/notesnook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.env-cmdrc.js
48 lines (47 loc) · 1.11 KB
/
.env-cmdrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const { execSync } = require("child_process");
const { cpus, networkInterfaces } = require("os");
const { version } = require("./package.json");
const ip = require("ip");
const NUM_CPUS = cpus().length;
const IS_CI = process.env.CI;
const gitHash = execSync("git rev-parse --short HEAD").toString().trim();
const APP_VERSION = version.replaceAll(".", "");
console.log("App version:", APP_VERSION);
console.log("Ip address:", ip.address());
module.exports = {
beta: {
REACT_APP_BETA: true
},
test: {
TEST_ALL: true
},
all: {
UV_THREADPOOL_SIZE: IS_CI ? NUM_CPUS : 2,
GENERATE_SOURCEMAP: false,
INLINE_RUNTIME_CHUNK: false,
DISABLE_ESLINT_PLUGIN: true,
REACT_APP_GIT_HASH: gitHash,
REACT_APP_VERSION: APP_VERSION
},
dev: {
REACT_APP_LOCALHOST: ip.address(),
REACT_APP_CI: "true"
},
web: {
REACT_APP_PLATFORM: "web"
},
debug: {
PWDEBUG: 1,
DEBUG: "pw:api"
},
silent: {
REACT_APP_TEST: true,
DISABLE_ESLINT_PLUGIN: "true",
FAST_REFRESH: "false",
BROWSER: "none"
},
desktop: {
BROWSER: "none",
REACT_APP_PLATFORM: "desktop"
}
};