-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconst.ts
36 lines (27 loc) · 1.16 KB
/
const.ts
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
import { env } from 'std-env'
import { parseJSON } from './_utils'
/** Value of `process.env.UNI_CLI_CONTEXT` */
export const cliContext = env.UNI_CLI_CONTEXT as string
/** Value of `process.env.UNI_INPUT_DIR` */
export const inputDir = env.UNI_INPUT_DIR as string
/** Value of `process.env.UNI_OUTPUT_DIR` */
export const outputDir = env.UNI_OUTPUT_DIR as string
/** Value of `process.env.STAT_TITLE_JSON` */
export const statTitleJson = parseJSON<Record<string, string>>(
env.STAT_TITLE_JSON,
)
/** Value of `process.env.UNI_CUSTOM_CONTEXT` */
export const customContext = env.UNI_CUSTOM_CONTEXT
/** Value of `process.env.UNI_CUSTOM_SCRIPT` */
export const customScript = env.UNI_CUSTOM_SCRIPT
/** Value of `process.env.UNI_CUSTOM_DEFINE` */
export const customDefine = env.UNI_CUSTOM_DEFINE
/** Value of `process.env.UNI_SUBPACKAGE` */
export const subpackage = env.UNI_SUBPACKAGE
/** Value of `process.env.UNI_RENDERER` */
export const renderer = env.UNI_RENDERER as 'native' | undefined
/** Value of `process.env.UNI_RENDERER_NATIVE` */
export const rendererNative = env.UNI_RENDERER_NATIVE as
| 'appService'
| 'pages'
| undefined