[go: nahoru, domu]

Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatXliner authored and DragonXDev committed Mar 1, 2024
1 parent 16f2518 commit 94a4326
Show file tree
Hide file tree
Showing 36 changed files with 914 additions and 5 deletions.
20 changes: 20 additions & 0 deletions apps/WarriorHappy/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { StyleSheet, Text, View } from "react-native";
import { StatusBar } from "expo-status-bar";

export default function App() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
<StatusBar style="auto" />
</View>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
});
58 changes: 58 additions & 0 deletions apps/WarriorHappy/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import type { ExpoConfig } from "@expo/config";

// if (
// !process.env.EXPO_PUBLIC_SUPABASE_URL ||
// !process.env.EXPO_PUBLIC_SUPABASE_ANON_KEY
// ) {
// throw new Error(
// "Please provide SUPABASE_URL and SUPABASE_ANON_KEY in your .env file",
// );
// }

const defineConfig = (): ExpoConfig => ({
name: "WarriorHappy",
slug: "create-t3-turbo",
scheme: "team3256",
version: "2.0.4",
orientation: "portrait",
icon: "./assets/icon.png",
userInterfaceStyle: "dark",
splash: {
image: "./assets/icon.png",
resizeMode: "contain",
backgroundColor: "#18181A",
},
updates: {
fallbackToCacheTimeout: 0,
},
assetBundlePatterns: ["**/*"],
ios: {
bundleIdentifier: "co.team3256.warriorhappy",
supportsTablet: true,
usesAppleSignIn: true,
},
android: {
package: "co.team3256.warriorhappy",
adaptiveIcon: {
foregroundImage: "./assets/icon.png",
backgroundColor: "#18181A",
},
},
experiments: {
tsconfigPaths: true,
typedRoutes: true,
},
extra: {
eas: {
projectId: "c7faf499-0164-4466-ba2a-46cf3b1047d7",
owner: "warriorborgs",
},
},
plugins: [
"./expo-plugins/with-modify-gradle.cjs",
"expo-apple-authentication",
],
owner: "warriorborgs",
});

export default defineConfig;
Binary file added apps/WarriorHappy/assets/adaptive-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 added apps/WarriorHappy/assets/favicon.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 added apps/WarriorHappy/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 added apps/WarriorHappy/assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions apps/WarriorHappy/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = (api) => {
api.cache(true);
return {
presets: [
["babel-preset-expo", { jsxImportSource: "nativewind" }],
"nativewind/babel",
],
};
};
26 changes: 26 additions & 0 deletions apps/WarriorHappy/eas.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,42 @@
{
"cli": {
<<<<<<< HEAD
"version": ">= 7.3.0"
},
"build": {
"development": {
=======
"version": ">= 4.1.2"
},
"build": {
"base": {
"node": "18.16.1",
"ios": {
"resourceClass": "m-medium"
}
},
"development": {
"extends": "base",
>>>>>>> 5e3e22c (WIP)
"developmentClient": true,
"distribution": "internal"
},
"preview": {
<<<<<<< HEAD
"distribution": "internal"
},
"production": {}
=======
"extends": "base",
"distribution": "internal",
"ios": {
"simulator": true
}
},
"production": {
"extends": "base"
}
>>>>>>> 5e3e22c (WIP)
},
"submit": {
"production": {}
Expand Down
44 changes: 44 additions & 0 deletions apps/WarriorHappy/expo-plugins/with-modify-gradle.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// This plugin is required for fixing `.apk` build issue
// It appends Expo and RN versions into the `build.gradle` file
// References:
// https://github.com/t3-oss/create-t3-turbo/issues/120
// https://github.com/expo/expo/issues/18129

/** @type {import("@expo/config-plugins").ConfigPlugin} */
const defineConfig = (config) => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
return require("@expo/config-plugins").withProjectBuildGradle(
config,
(config) => {
if (!config.modResults.contents.includes("ext.getPackageJsonVersion =")) {
config.modResults.contents = config.modResults.contents.replace(
"buildscript {",
`buildscript {
ext.getPackageJsonVersion = { packageName ->
new File(['node', '--print', "JSON.parse(require('fs').readFileSync(require.resolve('\${packageName}/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())
}`,
);
}

if (!config.modResults.contents.includes("reactNativeVersion =")) {
config.modResults.contents = config.modResults.contents.replace(
"ext {",
`ext {
reactNativeVersion = "\${ext.getPackageJsonVersion('react-native')}"`,
);
}

if (!config.modResults.contents.includes("expoPackageVersion =")) {
config.modResults.contents = config.modResults.contents.replace(
"ext {",
`ext {
expoPackageVersion = "\${ext.getPackageJsonVersion('expo')}"`,
);
}

return config;
},
);
};

module.exports = defineConfig;
3 changes: 3 additions & 0 deletions apps/WarriorHappy/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
4 changes: 4 additions & 0 deletions apps/WarriorHappy/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// https://github.com/expo/expo/issues/11074#issuecomment-1949418088
<<<<<<< HEAD
// A really, really, really, dumb workaround.
// import "../../node_modules/expo-router";
=======
// A really, really, really, dumb workaround for pnpm monorepos
>>>>>>> 5e3e22c (WIP)
import "expo-router/entry";
14 changes: 14 additions & 0 deletions apps/WarriorHappy/metro.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const { getDefaultConfig } = require("expo/metro-config");
const { withNativeWind } = require("nativewind/metro");
const { withTamagui } = require("@tamagui/metro-plugin");

const config = getDefaultConfig(__dirname);

module.exports = withTamagui(
withNativeWind(config, { input: "./global.css" }),
{
components: ["tamagui"],
config: "./tamagui.config.ts",
outputCSS: "./tamagui-web.css",
},
);
4 changes: 4 additions & 0 deletions apps/WarriorHappy/nativewind-env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<<<<<<< HEAD
/// <reference types="nativewind/types" />
=======
/// <reference types="nativewind/types" />
>>>>>>> 5e3e22c (WIP)
21 changes: 21 additions & 0 deletions apps/WarriorHappy/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "warriorhappy",
<<<<<<< HEAD
"main": "index.ts",
"version": "3.1.1",
"scripts": {
Expand Down Expand Up @@ -60,6 +61,26 @@
"jest-expo": "~50.0.2",
"react-test-renderer": "18.2.0",
"typescript": "^5.3.3"
=======
"version": "1.0.0",
"main": "expo-router/entry",
"type": "module",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"@acme/tamagui-config": "workspace:^",
"expo": "^50.0.7",
"expo-status-bar": "~1.11.1",
"react": "^18.2.0",
"react-native": "0.73.4"
},
"devDependencies": {
"@babel/core": "^7.23.9"
>>>>>>> 5e3e22c (WIP)
},
"private": true
}
8 changes: 8 additions & 0 deletions apps/WarriorHappy/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
// NOTE: Update this to include the paths to all of your component files.
<<<<<<< HEAD
content: ["./src/app/**/*.{js,jsx,ts,tsx}"],
=======
content: ["./app/**/*.{js,jsx,ts,tsx}"],
>>>>>>> 5e3e22c (WIP)
presets: [require("nativewind/preset")],
theme: {
extend: {},
},
plugins: [],
<<<<<<< HEAD
};
=======
}
>>>>>>> 5e3e22c (WIP)
2 changes: 2 additions & 0 deletions apps/WarriorHappy/tamagui.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import appConfig from "@acme/tamagui-config";
export default appConfig;
9 changes: 9 additions & 0 deletions apps/WarriorHappy/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
<<<<<<< HEAD
"compilerOptions": {
"jsx": "react",
"strict": true,
Expand All @@ -9,11 +10,19 @@
"~/*": ["./src/*"]
}
},
=======
"compilerOptions": {},
"extends": "expo/tsconfig.base",
>>>>>>> 5e3e22c (WIP)
"include": [
"**/*.ts",
"**/*.tsx",
".expo/types/**/*.ts",
"expo-env.d.ts"
<<<<<<< HEAD
],
"extends": "expo/tsconfig.base"
=======
]
>>>>>>> 5e3e22c (WIP)
}
91 changes: 91 additions & 0 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"name": "@acme/expo",
"version": "0.1.0",
"private": true,
"main": "expo-router/entry",
"scripts": {
"clean": "git clean -xdf .expo .turbo node_modules",
"dev": "pnpm with-env expo start --ios",
"dev:android": "pnpm with-env expo start --android",
"dev:ios": "pnpm with-env expo start --ios",
"dev:go": "pnpm with-env expo start --go",
"lint": "eslint .",
"format": "prettier --check . --ignore-path ../../.gitignore",
"typecheck": "tsc --noEmit",
"android": "pnpm with-env expo run:android",
"ios": "pnpm with-env expo run:ios",
"build:ios:local": "pnpm with-env eas build --platform ios --local --output ./builds/ios",
"build:ios": "pnpm with-env eas build --platform ios",
"build:ios:non-interactive": "pnpm with-env eas build --platform ios --non-interactive",
"build:ios:local:non-interactive": "pnpm with-env eas build --platform ios --local --non-interactive",
"with-env": "dotenv -e ../../.env --",
"expo": "expo"
},
"dependencies": {
"@acme/tamagui-config": "workspace:^",
"@expo/metro-config": "^0.17.4",
"@sentry/react-native": "^5.17.0",
"@shopify/flash-list": "1.6.3",
"@supabase/auth-helpers-react": "^0.4.2",
"@supabase/supabase-js": "^2.39.7",
"@tamagui/lucide-icons": "^1.90.6",
"@tanstack/react-query": "^5.22.2",
"@trpc/client": "11.0.0-next-beta.289",
"@trpc/react-query": "11.0.0-next-beta.289",
"@trpc/server": "11.0.0-next-beta.289",
"expo": "^50.0.7",
"expo-apple-authentication": "~6.3.0",
"expo-constants": "~15.4.5",
"expo-crypto": "^12.8.1",
"expo-image": "~1.10.6",
"expo-linking": "~6.2.2",
"expo-router": "~3.4.7",
"expo-secure-store": "~12.8.1",
"expo-splash-screen": "~0.26.4",
"expo-sqlite": "~13.2.2",
"expo-status-bar": "~1.11.1",
"nativewind": "4.0.36",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-native": "0.73.4",
"react-native-gesture-handler": "~2.14.1",
"react-native-reanimated": "^3.6.3",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
"react-native-svg": "^14.1.0",
"react-native-url-polyfill": "^2.0.0",
"superjson": "2.2.1",
"tamagui": "^1.90.6"
},
"devDependencies": {
"@acme/api": "workspace:^",
"@acme/eslint-config": "workspace:^",
"@acme/prettier-config": "workspace:^",
"@acme/tailwind-config": "workspace:^",
"@acme/tsconfig": "workspace:^",
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@babel/runtime": "^7.23.9",
"@expo/config-plugins": "^7.8.4",
"@types/babel__core": "^7.20.5",
"@types/react": "^18.2.58",
"eslint": "^8.56.0",
"prettier": "^3.2.5",
"tailwindcss": "3.4.1",
"typescript": "^5.3.3"
},
"eslintConfig": {
"root": true,
"extends": [
"@acme/eslint-config/base",
"@acme/eslint-config/react"
],
"ignorePatterns": [
"expo-plugins/**"
],
"rules": {
"jsx-a11y/alt-text": "off"
}
},
"prettier": "@acme/prettier-config"
}
Loading

0 comments on commit 94a4326

Please sign in to comment.