Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit dce3d74

Browse files
committed
chore: initialize project with package.json and tsconfig.json
- Added package.json with project metadata, dependencies, and scripts for starting the Expo app. - Created tsconfig.json to configure TypeScript settings, extending from Expo's base configuration and enabling strict type checking.
0 parents  commit dce3d74

17 files changed

+2349
-0
lines changed

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
indent_size = 2
6+
charset = utf-8
7+
insert_final_newline = true
8+
end_of_line = crlf
9+
10+
[*.md]
11+
indent_style = space
12+
indent_size = 2
13+
14+
[*.yml]
15+
indent_style = space
16+
indent_size = 2
17+
18+
[LICENSE]
19+
indent_style = space
20+
indent_size = 4

.gitignore

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# TernJS port file
120+
.tern-port
121+
122+
# Stores VSCode versions used for testing VSCode extensions
123+
.vscode-test
124+
125+
# yarn v2
126+
.yarn/cache
127+
.yarn/unplugged
128+
.yarn/build-state.yml
129+
.yarn/install-state.gz
130+
.pnp.*
131+
132+
# Expo
133+
.expo/
134+
135+
# Visual Studio Code
136+
.vscode/
137+
138+
# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
139+
# The following patterns were generated by expo-cli
140+
141+
expo-env.d.ts
142+
# @end expo-cli

.prettierrc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"arrowParens": "always",
3+
"bracketSameLine": false,
4+
"bracketSpacing": true,
5+
"semi": true,
6+
"experimentalTernaries": false,
7+
"singleQuote": true,
8+
"jsxSingleQuote": false,
9+
"quoteProps": "as-needed",
10+
"trailingComma": "all",
11+
"singleAttributePerLine": false,
12+
"htmlWhitespaceSensitivity": "css",
13+
"vueIndentScriptAndStyle": false,
14+
"proseWrap": "preserve",
15+
"insertPragma": false,
16+
"printWidth": 80,
17+
"requirePragma": false,
18+
"tabWidth": 2,
19+
"useTabs": true,
20+
"embeddedLanguageFormatting": "auto",
21+
"cursorOffset": -1,
22+
"plugins": ["@trivago/prettier-plugin-sort-imports"],
23+
"importOrder": ["<THIRD_PARTY_MODULES>", "^@/(.*)$", "^./(.*)$"],
24+
"importOrderSeparation": true,
25+
"importOrderSortSpecifiers": true,
26+
"importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"]
27+
}

app.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"expo": {
3+
"name": "gift-idea-tracker",
4+
"slug": "gift-idea-tracker",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/images/icon.png",
8+
"scheme": "gift-idea-tracker",
9+
"userInterfaceStyle": "light",
10+
"newArchEnabled": true,
11+
"splash": {
12+
"image": "./assets/images/splash-icon.png",
13+
"resizeMode": "contain",
14+
"backgroundColor": "#ffffff"
15+
},
16+
"ios": {
17+
"supportsTablet": true
18+
},
19+
"android": {
20+
"adaptiveIcon": {
21+
"foregroundImage": "./assets/images/adaptive-icon.png",
22+
"backgroundColor": "#ffffff"
23+
},
24+
"package": "io.fptqnk17.gift_idea_tracker"
25+
},
26+
"plugins": ["expo-router"],
27+
"experiments": {
28+
"typedRoutes": true
29+
}
30+
}
31+
}

app/(tabs)/_layout.tsx

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import FontAwesome from '@expo/vector-icons/FontAwesome';
2+
import { Link, Tabs } from 'expo-router';
3+
import React from 'react';
4+
import { Pressable } from 'react-native';
5+
6+
// You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/
7+
function TabBarIcon(props: {
8+
name: React.ComponentProps<typeof FontAwesome>['name'];
9+
color: string;
10+
}) {
11+
return <FontAwesome size={28} style={{ marginBottom: -3 }} {...props} />;
12+
}
13+
14+
export default function TabLayout() {
15+
return (
16+
<Tabs
17+
screenOptions={
18+
{
19+
// Disable the static render of the header on web
20+
// to prevent a hydration error in React Navigation v6.
21+
}
22+
}
23+
>
24+
<Tabs.Screen
25+
name="index"
26+
options={{
27+
title: 'Tab One',
28+
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
29+
headerRight: () => (
30+
<Link href="/modal" asChild>
31+
<Pressable>
32+
{({ pressed }) => (
33+
<FontAwesome
34+
name="info-circle"
35+
size={25}
36+
style={{ marginRight: 15, opacity: pressed ? 0.5 : 1 }}
37+
/>
38+
)}
39+
</Pressable>
40+
</Link>
41+
),
42+
}}
43+
/>
44+
<Tabs.Screen
45+
name="two"
46+
options={{
47+
title: 'Tab Two',
48+
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
49+
}}
50+
/>
51+
</Tabs>
52+
);
53+
}

app/(tabs)/index.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { StyleSheet, Text, View } from 'react-native';
2+
3+
export default function TabOneScreen() {
4+
return (
5+
<View style={styles.container}>
6+
<Text style={styles.title}>Tab One</Text>
7+
</View>
8+
);
9+
}
10+
11+
const styles = StyleSheet.create({
12+
container: {
13+
flex: 1,
14+
alignItems: 'center',
15+
justifyContent: 'center',
16+
},
17+
title: {
18+
fontSize: 20,
19+
fontWeight: 'bold',
20+
},
21+
separator: {
22+
marginVertical: 30,
23+
height: 1,
24+
width: '80%',
25+
},
26+
});

app/(tabs)/two.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { StyleSheet, Text, View } from 'react-native';
2+
3+
export default function TabTwoScreen() {
4+
return (
5+
<View style={styles.container}>
6+
<Text style={styles.title}>Tab Two</Text>
7+
<View style={styles.separator} />
8+
</View>
9+
);
10+
}
11+
12+
const styles = StyleSheet.create({
13+
container: {
14+
flex: 1,
15+
alignItems: 'center',
16+
justifyContent: 'center',
17+
},
18+
title: {
19+
fontSize: 20,
20+
fontWeight: 'bold',
21+
},
22+
separator: {
23+
marginVertical: 30,
24+
height: 1,
25+
width: '80%',
26+
},
27+
});

app/+not-found.tsx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { Link, Stack } from 'expo-router';
2+
import { StyleSheet } from 'react-native';
3+
import { Text, View } from 'react-native';
4+
5+
export default function NotFoundScreen() {
6+
return (
7+
<>
8+
<Stack.Screen options={{ title: 'Oops!' }} />
9+
<View style={styles.container}>
10+
<Text style={styles.title}>This screen doesn't exist.</Text>
11+
12+
<Link href="/" style={styles.link}>
13+
<Text style={styles.linkText}>Go to home screen!</Text>
14+
</Link>
15+
</View>
16+
</>
17+
);
18+
}
19+
20+
const styles = StyleSheet.create({
21+
container: {
22+
flex: 1,
23+
alignItems: 'center',
24+
justifyContent: 'center',
25+
padding: 20,
26+
},
27+
title: {
28+
fontSize: 20,
29+
fontWeight: 'bold',
30+
},
31+
link: {
32+
marginTop: 15,
33+
paddingVertical: 15,
34+
},
35+
linkText: {
36+
fontSize: 14,
37+
color: '#2e78b7',
38+
},
39+
});

0 commit comments

Comments
 (0)