-
Notifications
You must be signed in to change notification settings - Fork 15
/
app.config.ts
72 lines (68 loc) · 1.6 KB
/
app.config.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* eslint-disable turbo/no-undeclared-env-vars */
import { ConfigContext, ExpoConfig } from '@expo/config'
import dotenv from 'dotenv'
dotenv.config({
path: `.env.${process.env.APP_VARIANT} ?? 'development'`,
})
const { APP_VARIANT } = process.env
const getVariantConfig = (config: ConfigContext['config']) => ({
development: {
...config,
name: `[DEV] ${config.name}`,
slug: `${config.slug}`,
icon: './assets/icon-dev.png',
android: {
...config.android,
package: 'dev.com.REPLACE-ME',
},
ios: {
...config.ios,
bundleIdentifier: 'dev.com.REPLACE-ME',
},
},
staging: {
...config,
name: `[STAGING] ${config.name}`,
slug: `${config.slug}`,
icon: './assets/icon-dev.png',
android: {
...config.android,
package: 'staging.com.REPLACE-ME',
},
ios: {
...config.ios,
bundleIdentifier: 'staging.com.REPLACE-ME',
},
},
preview: {
...config,
name: `[PREVIEW] ${config.name}`,
slug: `${config.slug}`,
icon: './assets/icon.png',
android: {
...config.android,
package: 'preview.com.REPLACE-ME',
},
ios: {
...config.ios,
bundleIdentifier: 'preview.com.REPLACE-ME',
},
},
production: {
...config,
name: `${config.name}`,
slug: `${config.slug}`,
icon: './assets/icon.png',
android: {
...config.android,
package: 'com.REPLACE-ME',
},
ios: {
...config.ios,
bundleIdentifier: 'com.REPLACE-ME',
},
},
})
export default ({ config }: ConfigContext): ExpoConfig => ({
...getVariantConfig(config)[APP_VARIANT],
})