-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.config.ts
120 lines (112 loc) · 3.74 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// WARNING THIS ISN'T VERSIONED
import { ExpoConfig, ConfigContext } from 'expo/config';
export const ENV = {
APP_ENV: 'development',
EXPO_PUBLIC_APP_DISPLAY_NAME: '(Dev) RouterWind',
EXPO_PUBLIC_PACKAGE: 'com.rally2.routerwind.dev',
EXPO_PUBLIC_ADAPTIVE_BACKGROUND: '#99FFBE',
EXPO_PUBLIC_SCHEME: 'routerwinddev',
EXPO_PUBLIC_BUNDLE_ID: 'com.rally2.routerwind.dev',
EXPO_PUBLIC_ICON_PATH: './assets/dev/icon.dev.png',
// Versioing
EXPO_PUBLIC_APP_VERSION: '1.0',
EXPO_PUBLIC_BUILD_NUMBER: '1',
EXPO_PUBLIC_OTA: '0',
EXPO_PUBLIC_ANDROID_VERSION_CODE: 10000000
};
if (process.env.APP_ENV === 'production') {
setupProductionEnvironment();
} else if (process.env.APP_ENV === 'staging') {
setupStagingEnvironment();
} else {
// Development environemnt is configured based on the .env file
}
// See https://docs.expo.dev/versions/latest/config/app/
export default ({ config }: ConfigContext): ExpoConfig => ({
// Spreads static configuration from app.json if we want to seperate out and be more
// explicit about what should / and should not change
...config,
name: ENV.EXPO_PUBLIC_APP_DISPLAY_NAME || '(Dev) RouterWind',
owner: 'rally2',
slug: 'routerwind',
description:
'Expo Router & Nativewind Template to quick project spin up. Configured environments, EAS profiles & more!',
privacy: 'hidden',
platforms: ['android', 'ios', 'web'],
scheme: ENV.EXPO_PUBLIC_SCHEME,
version: ENV.EXPO_PUBLIC_APP_VERSION,
orientation: 'portrait',
icon: ENV.EXPO_PUBLIC_ICON_PATH,
userInterfaceStyle: 'automatic',
splash: {
image: './assets/splash.png',
resizeMode: 'contain',
backgroundColor: '#1F2937'
},
updates: {
fallbackToCacheTimeout: 3000,
url: 'https://u.expo.dev/343b7455-38e2-4f2d-b28e-cedbcbde87bd'
},
runtimeVersion: {
policy: 'appVersion'
},
assetBundlePatterns: ['**/*'],
ios: {
privacyManifests: {},
bundleIdentifier: ENV.EXPO_PUBLIC_BUNDLE_ID,
buildNumber: ENV.EXPO_PUBLIC_BUILD_NUMBER,
supportsTablet: true
},
android: {
package: ENV.EXPO_PUBLIC_PACKAGE,
adaptiveIcon: {
foregroundImage: './assets/adaptive-icon.png',
backgroundColor: '#1F2937'
},
versionCode: ENV.EXPO_PUBLIC_ANDROID_VERSION_CODE,
},
web: {
bundler: 'metro',
output: 'static',
favicon: './assets/images/favicon.png'
},
extra: {
...ENV,
eas: {
projectId: '343b7455-38e2-4f2d-b28e-cedbcbde87bd'
}
},
experiments: {
typedRoutes: true,
tsconfigPaths: true
},
plugins: ['expo-router', 'expo-font']
});
function setupProductionEnvironment() {
ENV.APP_ENV = 'production';
ENV.EXPO_PUBLIC_APP_DISPLAY_NAME = 'RouterWind';
ENV.EXPO_PUBLIC_PACKAGE = 'com.rally2.routerwind';
ENV.EXPO_PUBLIC_ADAPTIVE_BACKGROUND = '#1F2937';
ENV.EXPO_PUBLIC_SCHEME = 'routerwind';
ENV.EXPO_PUBLIC_BUNDLE_ID = 'com.rally2.routerwind';
ENV.EXPO_PUBLIC_ICON_PATH = './assets/icon.png';
// Versioing
ENV.EXPO_PUBLIC_APP_VERSION = '1.0';
ENV.EXPO_PUBLIC_BUILD_NUMBER = '1';
ENV.EXPO_PUBLIC_OTA = '0';
ENV.EXPO_PUBLIC_ANDROID_VERSION_CODE = 10000000;
}
function setupStagingEnvironment() {
ENV.APP_ENV = 'staging';
ENV.EXPO_PUBLIC_APP_DISPLAY_NAME = '(UAT) RouterWind';
ENV.EXPO_PUBLIC_PACKAGE = 'com.rally2.routerwind.staging';
ENV.EXPO_PUBLIC_ADAPTIVE_BACKGROUND = '#fde047';
ENV.EXPO_PUBLIC_SCHEME = 'routerwindstaging';
ENV.EXPO_PUBLIC_BUNDLE_ID = 'com.rally2.routerwind.staging';
ENV.EXPO_PUBLIC_ICON_PATH = './assets/staging/icon.staging.png';
// Versioing
ENV.EXPO_PUBLIC_APP_VERSION = '1.0';
ENV.EXPO_PUBLIC_BUILD_NUMBER = '1';
ENV.EXPO_PUBLIC_OTA = '0';
ENV.EXPO_PUBLIC_ANDROID_VERSION_CODE = 10000000;
}