Skip to content

Commit d19ac85

Browse files
committed
Use Expo's App Configuration with TypeScript
1 parent baa7e69 commit d19ac85

3 files changed

Lines changed: 101 additions & 79 deletions

File tree

storybook/app.config.ts

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import type {
2+
ExpoConfig,
3+
} from "@expo/config"
4+
5+
const
6+
packageName =
7+
"com.audira.lib.carbonreactnative.storybook",
8+
9+
versionCode =
10+
1,
11+
12+
versionName =
13+
"1.0.0"
14+
15+
export default {
16+
17+
name: "Carbon React Native",
18+
slug: "carbonreactnativestorybook",
19+
scheme: "carbonreactnativestorybook",
20+
version: versionName,
21+
22+
orientation: "default",
23+
24+
userInterfaceStyle: "automatic",
25+
26+
platforms: [
27+
"android",
28+
"ios",
29+
"web",
30+
],
31+
32+
android: {
33+
versionCode: versionCode,
34+
adaptiveIcon: {
35+
backgroundColor: "#ffffff",
36+
foregroundImage: "./assets/images/android-icon-foreground.png",
37+
backgroundImage: "./assets/images/android-icon-background.png",
38+
monochromeImage: "./assets/images/android-icon-monochrome.png",
39+
},
40+
package: packageName,
41+
},
42+
43+
ios: {
44+
buildNumber: versionCode.toString(),
45+
supportsTablet: true,
46+
bundleIdentifier: packageName,
47+
icon: "./assets/images/android-icon-foreground.png",
48+
config: {
49+
usesNonExemptEncryption: false,
50+
},
51+
},
52+
53+
web: {
54+
output: "single",
55+
favicon: "./assets/images/favicon.png",
56+
},
57+
58+
plugins: [
59+
[
60+
"expo-font",
61+
{
62+
fonts: [
63+
"../assets/fonts/IBMPlexSans-Thin.ttf",
64+
"../assets/fonts/IBMPlexSans-Thin-Italic.ttf",
65+
"../assets/fonts/IBMPlexSans-ExtraLight.ttf",
66+
"../assets/fonts/IBMPlexSans-ExtraLight-Italic.ttf",
67+
"../assets/fonts/IBMPlexSans-Light.ttf",
68+
"../assets/fonts/IBMPlexSans-Light-Italic.ttf",
69+
"../assets/fonts/IBMPlexSans-Regular.ttf",
70+
"../assets/fonts/IBMPlexSans-Italic.ttf",
71+
"../assets/fonts/IBMPlexSans-Medium.ttf",
72+
"../assets/fonts/IBMPlexSans-Medium-Italic.ttf",
73+
"../assets/fonts/IBMPlexSans-SemiBold.ttf",
74+
"../assets/fonts/IBMPlexSans-SemiBold-Italic.ttf",
75+
"../assets/fonts/IBMPlexSans-Bold.ttf",
76+
"../assets/fonts/IBMPlexSans-Bold-Italic.ttf",
77+
],
78+
},
79+
],
80+
[
81+
"expo-splash-screen",
82+
{
83+
image: "./assets/images/splash-icon.png",
84+
imageWidth: 200,
85+
resizeMode: "contain",
86+
backgroundColor: "#ffffff",
87+
dark: {
88+
backgroundColor: "#ffffff",
89+
},
90+
},
91+
],
92+
],
93+
94+
experiments: {
95+
autolinkingModuleResolution: true,
96+
reactCompiler: false,
97+
},
98+
99+
} satisfies ExpoConfig

storybook/app.json

Lines changed: 0 additions & 76 deletions
This file was deleted.

storybook/tsconfig.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@
3434
"./.storybook/**/*",
3535
"./.storybook-rn/**/*",
3636
"./App.tsx",
37+
"./app.config.ts",
3738
"./index.js",
3839
"./stories/**/*",
39-
"./types/**/*",
40-
".expo/types/**/*.ts",
41-
"expo-env.d.ts",
40+
"./types/**/*"
4241
]
4342
}

0 commit comments

Comments
 (0)