Skip to content

Commit 65f0fea

Browse files
authored
Merge pull request #129 from flexbox/feature/espidode-5
feature/espidode 5
2 parents c5a67da + a42d63d commit 65f0fea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2014
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/node_modules
2+
.yarn/*
3+
!.yarn/patches
4+
!.yarn/plugins
5+
!.yarn/releases
6+
!.yarn/sdks
7+
!.yarn/versions
8+
9+
# expo
10+
**/.expo/*
11+
12+
# next.js
13+
**/.next/*
14+
/out/
15+
16+
# tamagui
17+
**/.tamagui/*
18+
19+
# production
20+
/build
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
.pnpm-debug.log*
27+
28+
# local env files
29+
.env.local
30+
.env.development.local
31+
.env.test.local
32+
.env.production.local
33+
34+
# vercel
35+
.vercel
36+
37+
# typescript
38+
*.tsbuildinfo
39+
40+
# os
41+
.DS_Store
42+
THUMBS_DB
43+
thumbs.db
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"trailingComma": "es5",
3+
"semi": false,
4+
"singleQuote": true,
5+
"arrowParens": "always",
6+
"printWidth": 100
7+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

hackathon/ui-tier-list/tamaguitierlist/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 28 additions & 0 deletions
Large diffs are not rendered by default.

hackathon/ui-tier-list/tamaguitierlist/.yarn/releases/yarn-3.2.3.cjs

Lines changed: 783 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
enableTelemetry: false
2+
3+
logFilters:
4+
- code: YN0002
5+
level: discard
6+
- code: YN0060
7+
level: discard
8+
- code: YN0006
9+
level: discard
10+
- code: YN0076
11+
level: discard
12+
- code: YN0013
13+
level: discard
14+
15+
nodeLinker: node-modules
16+
17+
plugins:
18+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
19+
spec: "@yarnpkg/plugin-workspace-tools"
20+
21+
yarnPath: .yarn/releases/yarn-3.2.3.cjs
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Tamagui + Solito + Next + Expo Monorepo
2+
3+
```sh
4+
npm create tamagui
5+
```
6+
7+
## 🔦 About
8+
9+
This monorepo is a starter for an Expo + Next.js + Tamagui + Solito app.
10+
11+
Many thanks to [@FernandoTheRojo](https://twitter.com/fernandotherojo) for the Solito starter monorepo which this was forked from. Check out his [talk about using expo + next together at Next.js Conf 2021](https://www.youtube.com/watch?v=0lnbdRweJtA).
12+
13+
## 📦 Included packages
14+
15+
- [Tamagui](https://tamagui.dev) 🪄
16+
- [solito](https://solito.dev) for cross-platform navigation
17+
- Expo SDK
18+
- Next.js
19+
- React Navigation
20+
21+
## 🗂 Folder layout
22+
23+
The main apps are:
24+
25+
- `expo` (native)
26+
- `next` (web)
27+
28+
- `packages` shared packages across apps
29+
- `ui` includes your custom UI kit that will be optimized by Tamagui
30+
- `app` you'll be importing most files from `app/`
31+
- `features` (don't use a `screens` folder. organize by feature.)
32+
- `provider` (all the providers that wrap the app, and some no-ops for Web.)
33+
- `navigation` Next.js has a `pages/` folder. React Native doesn't. This folder contains navigation-related code for RN. You may use it for any navigation code, such as custom links.
34+
35+
You can add other folders inside of `packages/` if you know what you're doing and have a good reason to.
36+
37+
## 🏁 Start the app
38+
39+
- Install dependencies: `yarn`
40+
41+
- Next.js local dev: `yarn web`
42+
43+
To run with optimizer on in dev mode (just for testing, it's faster to leave it off): `yarn web:extract`. To build for production `yarn:prod`.
44+
45+
To see debug output to verify the compiler, add `// debug` as a comment to the top of any file.
46+
47+
- Expo local dev: `yarn native`
48+
49+
50+
## Developing
51+
52+
We've added `packages/ui` to show an example of [building your own design system](https://tamagui.dev/docs/guides/design-systems).
53+
54+
## UI Kit
55+
56+
Note we're following the [design systems guide](https://tamagui.dev/docs/guides/design-systems) and creating our own package for components.
57+
58+
See `packages/ui` named `@my/ui` for how this works.
59+
60+
## 🆕 Add new dependencies
61+
62+
### Pure JS dependencies
63+
64+
If you're installing a JavaScript-only dependency that will be used across platforms, install it in `packages/app`:
65+
66+
```sh
67+
cd packages/app
68+
yarn add date-fns
69+
cd ../..
70+
yarn
71+
```
72+
73+
### Native dependencies
74+
75+
If you're installing a library with any native code, you must install it in `expo`:
76+
77+
```sh
78+
cd apps/expo
79+
yarn add react-native-reanimated
80+
cd ..
81+
yarn
82+
```
83+
84+
You can also install the native library inside of `packages/app` if you want to get autoimport for that package inside of the `app` folder. However, you need to be careful and install the _exact_ same version in both packages. If the versions mismatch at all, you'll potentially get terrible bugs. This is a classic monorepo issue. I use `lerna-update-wizard` to help with this (you don't need to use Lerna to use that lib).
85+
86+
You may potentially want to have the native module transpiled for the next app. Add the module name to the list for `withTM` in the [`apps/next/next.config.js`](apps/next/next.config.js#L47) file.
87+
88+
```ts
89+
withTM([
90+
'solito',
91+
'react-native-web',
92+
'expo-linking',
93+
'expo-constants',
94+
'expo-modules-core',
95+
'expo-crypto', // <-- add this or any other native module
96+
])
97+
```
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
.expo
2+
3+
# OSX
4+
#
5+
.DS_Store
6+
7+
# Xcode
8+
#
9+
build/
10+
*.pbxuser
11+
!default.pbxuser
12+
*.mode1v3
13+
!default.mode1v3
14+
*.mode2v3
15+
!default.mode2v3
16+
*.perspectivev3
17+
!default.perspectivev3
18+
xcuserdata
19+
*.xccheckout
20+
*.moved-aside
21+
DerivedData
22+
*.hmap
23+
*.ipa
24+
*.xcuserstate
25+
project.xcworkspace
26+
27+
# Android/IntelliJ
28+
#
29+
build/
30+
.idea
31+
.gradle
32+
local.properties
33+
*.iml
34+
*.hprof
35+
36+
# node.js
37+
#
38+
node_modules/
39+
npm-debug.log
40+
yarn-error.log
41+
42+
# BUCK
43+
buck-out/
44+
\.buckd/
45+
*.keystore
46+
47+
# fastlane
48+
#
49+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
50+
# screenshots whenever they are needed.
51+
# For more information about the recommended setup visit:
52+
# https://docs.fastlane.tools/best-practices/source-control/
53+
54+
*/fastlane/report.xml
55+
*/fastlane/Preview.html
56+
*/fastlane/screenshots
57+
58+
# Bundle artifacts
59+
*.jsbundle
60+
61+
# CocoaPods
62+
/ios/Pods/
63+
64+
# Expo
65+
.expo/*
66+
web-build/
67+
68+
# @generated expo-cli sync-e7dcf75f4e856f7b6f3239b3f3a7dd614ee755a8
69+
# The following patterns were generated by expo-cli
70+
71+
# OSX
72+
#
73+
.DS_Store
74+
75+
# Xcode
76+
#
77+
build/
78+
*.pbxuser
79+
!default.pbxuser
80+
*.mode1v3
81+
!default.mode1v3
82+
*.mode2v3
83+
!default.mode2v3
84+
*.perspectivev3
85+
!default.perspectivev3
86+
xcuserdata
87+
*.xccheckout
88+
*.moved-aside
89+
DerivedData
90+
*.hmap
91+
*.ipa
92+
*.xcuserstate
93+
project.xcworkspace
94+
95+
# Android/IntelliJ
96+
#
97+
build/
98+
.idea
99+
.gradle
100+
local.properties
101+
*.iml
102+
*.hprof
103+
104+
# node.js
105+
#
106+
node_modules/
107+
npm-debug.log
108+
yarn-error.log
109+
110+
# BUCK
111+
buck-out/
112+
\.buckd/
113+
*.keystore
114+
!debug.keystore
115+
116+
# Bundle artifacts
117+
*.jsbundle
118+
119+
# CocoaPods
120+
/ios/Pods/
121+
122+
# Expo
123+
.expo/
124+
web-build/
125+
dist/
126+
127+
# @end expo-cli
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import 'expo-dev-client'
2+
import React from 'react'
3+
import { NativeNavigation } from 'app/navigation/native'
4+
import { Provider } from 'app/provider'
5+
import { useFonts } from 'expo-font'
6+
7+
export default function App() {
8+
const [loaded] = useFonts({
9+
Inter: require('@tamagui/font-inter/otf/Inter-Medium.otf'),
10+
InterBold: require('@tamagui/font-inter/otf/Inter-Bold.otf'),
11+
})
12+
13+
if (!loaded) {
14+
return null
15+
}
16+
17+
return (
18+
<Provider>
19+
<NativeNavigation />
20+
</Provider>
21+
)
22+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"expo": {
3+
"name": "myapp",
4+
"slug": "myapp",
5+
"scheme": "myapp",
6+
"version": "1.0.0",
7+
"orientation": "portrait",
8+
"icon": "./assets/icon.png",
9+
"userInterfaceStyle": "light",
10+
"splash": {
11+
"image": "./assets/splash.png",
12+
"resizeMode": "contain",
13+
"backgroundColor": "#ffffff"
14+
},
15+
"updates": {
16+
"fallbackToCacheTimeout": 0
17+
},
18+
"assetBundlePatterns": [
19+
"**/*"
20+
],
21+
"ios": {
22+
"supportsTablet": true,
23+
"bundleIdentifier": "com.tamagui.myapp"
24+
},
25+
"android": {
26+
"adaptiveIcon": {
27+
"foregroundImage": "./assets/adaptive-icon.png",
28+
"backgroundColor": "#FFFFFF"
29+
},
30+
"package": "com.tamagui.myapp"
31+
},
32+
"web": {
33+
"favicon": "./assets/favicon.png"
34+
},
35+
"extra": {
36+
"eas": {
37+
"projectId": "061b4470-78c7-4d6a-b850-8167fb0a3434"
38+
}
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)