Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #42 from juliusmarminge/expo-env
Browse files Browse the repository at this point in the history
chore: use app.config for constants
  • Loading branch information
perkinsjr authored Jan 28, 2023
2 parents 6e33d0c + b02165c commit 94e1fb5
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 53 deletions.
40 changes: 40 additions & 0 deletions apps/expo/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { ExpoConfig, ConfigContext } from "@expo/config";

const CLERK_PUBLISHABLE_KEY = "your-clerk-publishable-key";

const defineConfig = (_ctx: ConfigContext): ExpoConfig => ({
name: "expo",
slug: "expo",
version: "1.0.0",
orientation: "portrait",
icon: "./assets/icon.png",
userInterfaceStyle: "light",
splash: {
image: "./assets/icon.png",
resizeMode: "contain",
backgroundColor: "#2e026d",
},
updates: {
fallbackToCacheTimeout: 0,
},
assetBundlePatterns: ["**/*"],
ios: {
supportsTablet: true,
bundleIdentifier: "your.bundle.identifier",
},
android: {
adaptiveIcon: {
foregroundImage: "./assets/icon.png",
backgroundColor: "#2e026d",
},
},
extra: {
eas: {
projectId: "your-project-id",
},
CLERK_PUBLISHABLE_KEY,
},
plugins: ["./expo-plugins/with-modify-gradle.js"],
});

export default defineConfig;
31 changes: 0 additions & 31 deletions apps/expo/app.json

This file was deleted.

Binary file removed apps/expo/assets/adaptive-icon.png
Binary file not shown.
Binary file removed apps/expo/assets/favicon.png
Binary file not shown.
Binary file modified apps/expo/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/expo/assets/splash.png
Binary file not shown.
4 changes: 2 additions & 2 deletions apps/expo/src/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import { HomeScreen } from "./screens/home";
import { SignInSignUpScreen } from "./screens/signin";
import { ClerkProvider, SignedIn, SignedOut } from "@clerk/clerk-expo";
import { tokenCache } from "./utils/cache";
import { CLERK_PUBLISHABLE_KEY } from "./constants";
import Constants from "expo-constants";

export const App = () => {
return (
<ClerkProvider
publishableKey={CLERK_PUBLISHABLE_KEY}
publishableKey={Constants.expoConfig?.extra?.CLERK_PUBLISHABLE_KEY}
tokenCache={tokenCache}
>
<SignedIn>
Expand Down
19 changes: 0 additions & 19 deletions apps/expo/src/constants.ts

This file was deleted.

2 changes: 1 addition & 1 deletion apps/expo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"strict": true,
"jsx": "react-native"
},
"include": ["src", "index.ts"]
"include": ["src", "index.ts", "app.config.ts"]
}

0 comments on commit 94e1fb5

Please sign in to comment.