Skip to content

Commit fe858e1

Browse files
committed
Initial commit
Generated by create-expo-stack 2.11.24
0 parents  commit fe858e1

22 files changed

+19456
-0
lines changed

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
node_modules/
2+
.expo/
3+
dist/
4+
npm-debug.*
5+
*.jks
6+
*.p8
7+
*.p12
8+
*.key
9+
*.mobileprovision
10+
*.orig.*
11+
web-build/
12+
# expo router
13+
expo-env.d.ts
14+
15+
16+
17+
ios
18+
android
19+
20+
# macOS
21+
.DS_Store
22+
23+
# Temporary files created by Metro to check the health of the file watcher
24+
.metro-health-check*

app.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"expo": {
3+
"name": "LimeApp",
4+
"slug": "LimeApp",
5+
"version": "1.0.0",
6+
7+
"scheme": "LimeApp",
8+
"web": {
9+
"bundler": "metro",
10+
"output": "static",
11+
"favicon": "./assets/favicon.png"
12+
},
13+
"plugins": ["expo-router"],
14+
"experiments": {
15+
"typedRoutes": true,
16+
17+
"tsconfigPaths": true
18+
},
19+
20+
"orientation": "portrait",
21+
"icon": "./assets/icon.png",
22+
23+
"userInterfaceStyle": "light",
24+
25+
"splash": {
26+
"image": "./assets/splash.png",
27+
"resizeMode": "contain",
28+
"backgroundColor": "#ffffff"
29+
},
30+
"assetBundlePatterns": ["**/*"],
31+
"ios": {
32+
"supportsTablet": true
33+
},
34+
"android": {
35+
"adaptiveIcon": {
36+
"foregroundImage": "./assets/adaptive-icon.png",
37+
"backgroundColor": "#ffffff"
38+
}
39+
}
40+
}
41+
}

app/+html.tsx

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import { ScrollViewStyleReset } from 'expo-router/html';
2+
3+
// This file is web-only and used to configure the root HTML for every
4+
// web page during static rendering.
5+
// The contents of this function only run in Node.js environments and
6+
// do not have access to the DOM or browser APIs.
7+
export default function Root({ children }: { children: React.ReactNode }) {
8+
return (
9+
<html lang="en">
10+
<head>
11+
<meta charSet="utf-8" />
12+
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
13+
14+
{/*
15+
This viewport disables scaling which makes the mobile website act more like a native app.
16+
However this does reduce built-in accessibility. If you want to enable scaling, use this instead:
17+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
18+
*/}
19+
<meta
20+
name="viewport"
21+
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover"
22+
/>
23+
{/*
24+
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
25+
However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line.
26+
*/}
27+
<ScrollViewStyleReset />
28+
29+
{/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */}
30+
<style dangerouslySetInnerHTML={{ __html: responsiveBackground }} />
31+
{/* Add any additional <head> elements that you want globally available on web... */}
32+
</head>
33+
<body>{children}</body>
34+
</html>
35+
);
36+
}
37+
38+
const responsiveBackground = `
39+
body {
40+
background-color: #fff;
41+
}
42+
@media (prefers-color-scheme: dark) {
43+
body {
44+
background-color: #000;
45+
}
46+
}`;

app/+not-found.tsx

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

app/_layout.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { Stack } from 'expo-router';
2+
3+
export default function Layout() {
4+
return <Stack />;
5+
}

app/details.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Stack, useLocalSearchParams } from 'expo-router';
2+
3+
import { Container } from '~/components/Container';
4+
import { ScreenContent } from '~/components/ScreenContent';
5+
6+
export default function Details() {
7+
const { name } = useLocalSearchParams();
8+
9+
return (
10+
<>
11+
<Stack.Screen options={{ title: 'Details' }} />
12+
<Container>
13+
<ScreenContent path="screens/details.tsx" title={`Showing details for user ${name}`} />
14+
</Container>
15+
</>
16+
);
17+
}

app/index.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Stack, Link } from 'expo-router';
2+
3+
import { Button } from '~/components/Button';
4+
import { Container } from '~/components/Container';
5+
import { ScreenContent } from '~/components/ScreenContent';
6+
7+
export default function Home() {
8+
return (
9+
<>
10+
<Stack.Screen options={{ title: 'Home' }} />
11+
<Container>
12+
<ScreenContent path="app/index.tsx" title="Home" />
13+
<Link href={{ pathname: '/details', params: { name: 'Dan' } }} asChild>
14+
<Button title="Show Details" />
15+
</Link>
16+
</Container>
17+
</>
18+
);
19+
}

assets/adaptive-icon.png

17.1 KB
Loading

assets/favicon.png

1.43 KB
Loading

assets/icon.png

21.9 KB
Loading

assets/splash.png

46.2 KB
Loading

babel.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = function (api) {
2+
api.cache(true);
3+
const plugins = [];
4+
5+
return {
6+
presets: ['babel-preset-expo'],
7+
8+
plugins,
9+
};
10+
};

cesconfig.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"cesVersion": "2.11.24",
3+
"projectName": "LimeApp",
4+
"packages": [
5+
{
6+
"name": "expo-router",
7+
"type": "navigation",
8+
"options": {
9+
"type": "stack"
10+
}
11+
},
12+
{
13+
"name": "stylesheet",
14+
"type": "styling"
15+
}
16+
],
17+
"flags": {
18+
"noGit": false,
19+
"noInstall": false,
20+
"overwrite": false,
21+
"importAlias": true,
22+
"packageManager": "npm",
23+
"eas": false
24+
},
25+
"packageManager": {
26+
"type": "npm",
27+
"version": "10.8.3"
28+
},
29+
"os": {
30+
"type": "Darwin",
31+
"platform": "darwin",
32+
"arch": "arm64",
33+
"kernelVersion": "23.4.0"
34+
}
35+
}

components/Button.tsx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { forwardRef } from 'react';
2+
import { StyleSheet, Text, TouchableOpacity, TouchableOpacityProps } from 'react-native';
3+
4+
type ButtonProps = {
5+
title?: string;
6+
} & TouchableOpacityProps;
7+
8+
export const Button = forwardRef<TouchableOpacity, ButtonProps>(
9+
({ title, ...touchableProps }, ref) => {
10+
return (
11+
<TouchableOpacity ref={ref} {...touchableProps} style={[styles.button, touchableProps.style]}>
12+
<Text style={styles.buttonText}>{title}</Text>
13+
</TouchableOpacity>
14+
);
15+
}
16+
);
17+
18+
const styles = StyleSheet.create({
19+
button: {
20+
alignItems: 'center',
21+
backgroundColor: '#6366F1',
22+
borderRadius: 24,
23+
elevation: 5,
24+
flexDirection: 'row',
25+
justifyContent: 'center',
26+
padding: 16,
27+
shadowColor: '#000',
28+
shadowOffset: {
29+
height: 2,
30+
width: 0,
31+
},
32+
shadowOpacity: 0.25,
33+
shadowRadius: 3.84,
34+
},
35+
buttonText: {
36+
color: '#FFFFFF',
37+
fontSize: 16,
38+
fontWeight: '600',
39+
textAlign: 'center',
40+
},
41+
});

components/Container.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { StyleSheet, SafeAreaView } from 'react-native';
2+
3+
export const Container = ({ children }: { children: React.ReactNode }) => {
4+
return <SafeAreaView style={styles.container}>{children}</SafeAreaView>;
5+
};
6+
7+
const styles = StyleSheet.create({
8+
container: {
9+
flex: 1,
10+
padding: 24,
11+
},
12+
});

components/EditScreenInfo.tsx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { StyleSheet, Text, View } from 'react-native';
2+
3+
export default function EditScreenInfo({ path }: { path: string }) {
4+
const title = 'Open up the code for this screen:';
5+
const description =
6+
'Change any of the text, save the file, and your app will automatically update.';
7+
8+
return (
9+
<View style={styles.getStartedContainer}>
10+
<Text style={styles.getStartedText}>{title}</Text>
11+
<View style={[styles.codeHighlightContainer, styles.homeScreenFilename]}>
12+
<Text>{path}</Text>
13+
</View>
14+
<Text style={styles.getStartedText}>{description}</Text>
15+
</View>
16+
);
17+
}
18+
19+
const styles = StyleSheet.create({
20+
codeHighlightContainer: {
21+
borderRadius: 3,
22+
paddingHorizontal: 4,
23+
},
24+
getStartedContainer: {
25+
alignItems: 'center',
26+
marginHorizontal: 50,
27+
},
28+
getStartedText: {
29+
fontSize: 17,
30+
lineHeight: 24,
31+
textAlign: 'center',
32+
},
33+
helpContainer: {
34+
alignItems: 'center',
35+
marginHorizontal: 20,
36+
marginTop: 15,
37+
},
38+
helpLink: {
39+
paddingVertical: 15,
40+
},
41+
helpLinkText: {
42+
textAlign: 'center',
43+
},
44+
homeScreenFilename: {
45+
marginVertical: 7,
46+
},
47+
});

components/ScreenContent.tsx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { StyleSheet, Text, View } from 'react-native';
2+
3+
import EditScreenInfo from './EditScreenInfo';
4+
5+
type ScreenContentProps = {
6+
title: string;
7+
path: string;
8+
children?: React.ReactNode;
9+
};
10+
11+
export const ScreenContent = ({ title, path, children }: ScreenContentProps) => {
12+
return (
13+
<View style={styles.container}>
14+
<Text style={styles.title}>{title}</Text>
15+
<View style={styles.separator} />
16+
<EditScreenInfo path={path} />
17+
{children}
18+
</View>
19+
);
20+
};
21+
22+
const styles = StyleSheet.create({
23+
container: {
24+
alignItems: 'center',
25+
flex: 1,
26+
justifyContent: 'center',
27+
},
28+
separator: {
29+
backgroundColor: '#d1d5db',
30+
height: 1,
31+
marginVertical: 30,
32+
width: '80%',
33+
},
34+
title: {
35+
fontSize: 20,
36+
fontWeight: 'bold',
37+
},
38+
});

metro.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Learn more https://docs.expo.io/guides/customizing-metro
2+
const { getDefaultConfig } = require('expo/metro-config');
3+
4+
/** @type {import('expo/metro-config').MetroConfig} */
5+
// eslint-disable-next-line no-undef
6+
const config = getDefaultConfig(__dirname);
7+
8+
module.exports = config;

0 commit comments

Comments
 (0)