-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigClient.ts
47 lines (40 loc) · 1.21 KB
/
configClient.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
import { ExpoConfig, ConfigContext } from '@expo/config';
import whiteLabel from "./src/whiteLabel"
const config = ({ config }: ConfigContext): ExpoConfig => {
const target: string = process.env.CLIENT || 'happywait'
const configClientIndex = Object.entries(whiteLabel).findIndex(([key, value]) => {
return key === target
})
const configClient = Object.entries(whiteLabel)[configClientIndex][1]
const test: ExpoConfig = {
...config,
updates: configClient.updates,
name: configClient.name,
slug: 'test-expo',
version: "1.0.0",
orientation: 'portrait',
icon: configClient.icon,
userInterfaceStyle: 'automatic',
splash: {
image: './assets/splash.png',
resizeMode: "contain",
backgroundColor: "#ffffff"
},
assetBundlePatterns: [
"**/*"
],
ios: {
bundleIdentifier: configClient.bundleId
},
android: {
package: configClient.packageId
},
extra: {
...config.extra,
bearer: process.env.BEARER
},
}
console.log(test);
return test
}
export default config