create-expo-stack 2.9.10-next.aa2c885 → 2.10.0-next.01a5826

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +9 -9
  2. package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/_layout.tsx.ejs +0 -1
  3. package/build/templates/packages/expo-router/drawer/app/(drawer)/index.tsx.ejs +1 -2
  4. package/build/templates/packages/expo-router/metro.config.js.ejs +4 -3
  5. package/build/templates/packages/expo-router/stack/app/_layout.tsx.ejs +1 -3
  6. package/build/templates/packages/nativewindui/components/BackButton.tsx.ejs +23 -0
  7. package/build/templates/packages/nativewindui/components/Button.tsx.ejs +40 -0
  8. package/build/templates/packages/nativewindui/components/Container.tsx.ejs +13 -0
  9. package/build/templates/packages/nativewindui/components/EditScreenInfo.tsx.ejs +55 -0
  10. package/build/templates/packages/nativewindui/components/HeaderButton.tsx.ejs +29 -0
  11. package/build/templates/packages/nativewindui/components/ScreenContent.tsx.ejs +38 -0
  12. package/build/templates/packages/nativewindui/components/TabBarIcon.tsx.ejs +15 -0
  13. package/build/templates/packages/nativewindui/drawer/app/(drawer)/(tabs)/_layout.tsx.ejs +28 -0
  14. package/build/templates/packages/nativewindui/drawer/app/(drawer)/(tabs)/index.tsx.ejs +714 -0
  15. package/build/templates/packages/nativewindui/drawer/app/(drawer)/(tabs)/two.tsx.ejs +15 -0
  16. package/build/templates/packages/nativewindui/drawer/app/(drawer)/_layout.tsx.ejs +35 -0
  17. package/build/templates/packages/nativewindui/drawer/app/(drawer)/index.tsx.ejs +15 -0
  18. package/build/templates/packages/nativewindui/drawer/app/+html.tsx.ejs +46 -0
  19. package/build/templates/packages/nativewindui/drawer/app/+not-found.tsx.ejs +123 -0
  20. package/build/templates/packages/nativewindui/drawer/app/_layout.tsx.ejs +73 -0
  21. package/build/templates/packages/nativewindui/stack/app/+html.tsx.ejs +46 -0
  22. package/build/templates/packages/nativewindui/stack/app/modal.tsx.ejs +33 -0
  23. package/build/templates/packages/nativewindui/tabs/app/(tabs)/_layout.tsx.ejs +35 -0
  24. package/build/templates/packages/nativewindui/tabs/app/(tabs)/index.tsx.ejs +713 -0
  25. package/build/templates/packages/nativewindui/tabs/app/(tabs)/two.tsx.ejs +22 -0
  26. package/build/templates/packages/nativewindui/tabs/app/+html.tsx.ejs +46 -0
  27. package/build/templates/packages/nativewindui/tabs/app/+not-found.tsx.ejs +130 -0
  28. package/build/templates/packages/nativewindui/tabs/app/_layout.tsx.ejs +68 -0
  29. package/build/templates/packages/nativewindui/tabs/app/modal.tsx.ejs +21 -0
  30. package/build/types/utilities/systemCommand.d.ts +10 -0
  31. package/build/utilities/configStorage.js +1 -1
  32. package/build/utilities/configureProjectFiles.js +52 -15
  33. package/build/utilities/generateProjectFiles.js +13 -15
  34. package/build/utilities/printOutput.js +11 -35
  35. package/build/utilities/runCLI.js +114 -121
  36. package/build/utilities/runEasConfigure.js +27 -25
  37. package/build/utilities/systemCommand.js +66 -0
  38. package/package.json +3 -1
  39. package/build/templates/packages/nativewindui/expo-env.d.ts.ejs +0 -3
  40. package/build/templates/packages/nativewindui/metro.config.js.ejs +0 -10
  41. /package/build/templates/packages/nativewindui/{app → drawer/app}/modal.tsx.ejs +0 -0
  42. /package/build/templates/packages/nativewindui/{app → stack/app}/+not-found.tsx.ejs +0 -0
  43. /package/build/templates/packages/nativewindui/{app → stack/app}/_layout.tsx.ejs +0 -0
  44. /package/build/templates/packages/nativewindui/{app → stack/app}/index.tsx.ejs +0 -0
package/README.md CHANGED
@@ -128,14 +128,21 @@ Thanks go to these wonderful people:
128
128
  <sub><b>Frank Calise</b></sub>
129
129
  </a>
130
130
  </td>
131
+ <td align="center">
132
+ <a href="https://github.com/dannyhw">
133
+ <img src="https://avatars.githubusercontent.com/u/3481514?v=4" width="100;" alt="dannyhw"/>
134
+ <br />
135
+ <sub><b>Daniel Williams</b></sub>
136
+ </a>
137
+ </td></tr>
138
+ <tr>
131
139
  <td align="center">
132
140
  <a href="https://github.com/ludwig-pro">
133
141
  <img src="https://avatars.githubusercontent.com/u/62896243?v=4" width="100;" alt="ludwig-pro"/>
134
142
  <br />
135
143
  <sub><b>Ludwig</b></sub>
136
144
  </a>
137
- </td></tr>
138
- <tr>
145
+ </td>
139
146
  <td align="center">
140
147
  <a href="https://github.com/PickleNik">
141
148
  <img src="https://avatars.githubusercontent.com/u/31113245?v=4" width="100;" alt="PickleNik"/>
@@ -150,13 +157,6 @@ Thanks go to these wonderful people:
150
157
  <sub><b>Zach Nugent</b></sub>
151
158
  </a>
152
159
  </td>
153
- <td align="center">
154
- <a href="https://github.com/dannyhw">
155
- <img src="https://avatars.githubusercontent.com/u/3481514?v=4" width="100;" alt="dannyhw"/>
156
- <br />
157
- <sub><b>Daniel Williams</b></sub>
158
- </a>
159
- </td>
160
160
  <td align="center">
161
161
  <a href="https://github.com/kratos-respawned">
162
162
  <img src="https://avatars.githubusercontent.com/u/87561983?v=4" width="100;" alt="kratos-respawned"/>
@@ -1,5 +1,4 @@
1
1
  import { Tabs } from 'expo-router';
2
- import { StyleSheet } from 'react-native';
3
2
  import { TabBarIcon } from '~/components/TabBarIcon';
4
3
 
5
4
 
@@ -1,5 +1,4 @@
1
1
  import { Stack } from 'expo-router';
2
- import { StyleSheet, View } from 'react-native';
3
2
 
4
3
  import { Container } from '~/components/Container';
5
4
  import { ScreenContent } from '~/components/ScreenContent';
@@ -9,7 +8,7 @@ export default function Home() {
9
8
  <>
10
9
  <Stack.Screen options={{ title: 'Home' }} />
11
10
  <Container>
12
- <ScreenContent path="app/(drawer)/(tabs)/index.tsx" title="Home" />
11
+ <ScreenContent path="app/(drawer)/index.tsx" title="Home" />
13
12
  </Container>
14
13
  </>
15
14
  );
@@ -1,6 +1,6 @@
1
1
  // Learn more https://docs.expo.io/guides/customizing-metro
2
2
  const { getDefaultConfig } = require('expo/metro-config');
3
- <% if (props.stylingPackage?.name === "nativewind") { %>
3
+ <% if (props.stylingPackage?.name === "nativewind" || "nativewindui") { %>
4
4
  const { withNativeWind } = require("nativewind/metro");
5
5
  <% } %>
6
6
 
@@ -10,7 +10,8 @@ const config = getDefaultConfig(__dirname);
10
10
 
11
11
  <% if (props.stylingPackage?.name === "nativewind") { %>
12
12
  module.exports = withNativeWind(config, { input: "./global.css" });
13
+ <% } else if (props.stylingPackage?.name === "nativewindui") { %>
14
+ module.exports = withNativeWind(config, { input: "./global.css", inlineRem: 16 });
13
15
  <% } else { %>
14
16
  module.exports = config;
15
- <% } %>
16
-
17
+ <% } %>
@@ -1,9 +1,7 @@
1
1
  <% if (props.stylingPackage?.name === "nativewind") { %>
2
2
  import '../global.css';
3
- <% } else if (props.stylingPackage?.name === "nativewinui") { %>
4
- import '../global.css';
5
- import 'expo-dev-client';
6
3
  <% } %>
4
+
7
5
  <% if (props.stylingPackage?.name === "unistyles") { %>
8
6
  import '../unistyles';
9
7
  <% } %>
@@ -0,0 +1,23 @@
1
+ import { Feather } from '@expo/vector-icons';
2
+ import { Text, View, StyleSheet } from 'react-native';
3
+
4
+ export const BackButton = ({ onPress }: { onPress: () => void }) => {
5
+ return (
6
+ <View style={styles.backButton}>
7
+ <Feather name="chevron-left" size={16} color="#007AFF" />
8
+ <Text style={styles.backButtonText} onPress={onPress}>
9
+ Back
10
+ </Text>
11
+ </View>
12
+ );
13
+ };
14
+ const styles = StyleSheet.create({
15
+ backButton: {
16
+ flexDirection: 'row',
17
+ paddingLeft: 20,
18
+ },
19
+ backButtonText: {
20
+ color: '#007AFF',
21
+ marginLeft: 4,
22
+ },
23
+ });
@@ -0,0 +1,40 @@
1
+ import { forwardRef } from 'react';
2
+ import { StyleSheet, Text, TouchableOpacity, TouchableOpacityProps } from 'react-native';
3
+
4
+ type ButtonProps = {
5
+ onPress?: TouchableOpacityProps['onPress'];
6
+ title?: string;
7
+ } & TouchableOpacityProps;
8
+
9
+ export const Button = forwardRef<TouchableOpacity, ButtonProps>(({ onPress, title }, ref) => {
10
+ return (
11
+ <TouchableOpacity ref={ref} style={styles.button} onPress={onPress}>
12
+ <Text style={styles.buttonText}>{title}</Text>
13
+ </TouchableOpacity>
14
+ );
15
+ });
16
+
17
+ const styles = StyleSheet.create({
18
+ button: {
19
+ alignItems: 'center',
20
+ backgroundColor: '#6366F1',
21
+ borderRadius: 24,
22
+ elevation: 5,
23
+ flexDirection: 'row',
24
+ justifyContent: 'center',
25
+ padding: 16,
26
+ shadowColor: '#000',
27
+ shadowOffset: {
28
+ height: 2,
29
+ width: 0,
30
+ },
31
+ shadowOpacity: 0.25,
32
+ shadowRadius: 3.84,
33
+ },
34
+ buttonText: {
35
+ color: '#FFFFFF',
36
+ fontSize: 16,
37
+ fontWeight: '600',
38
+ textAlign: 'center',
39
+ },
40
+ });
@@ -0,0 +1,13 @@
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
+ });
13
+
@@ -0,0 +1,55 @@
1
+ import { StyleSheet, Text, View } from 'react-native';
2
+
3
+ <% if (props.internalizationPackage?.name === "i18next") { %>
4
+ import { useTranslation } from 'react-i18next';
5
+ <% } %>
6
+
7
+ export default function EditScreenInfo({ path }: { path: string }) {
8
+ <% if (props.internalizationPackage?.name === "i18next") { %>
9
+ const { t } = useTranslation();
10
+ const title = t('getStarted');
11
+ const description = t('changeCode')
12
+ <% } else { %>
13
+ const title = "Open up the code for this screen:"
14
+ const description = "Change any of the text, save the file, and your app will automatically update."
15
+ <% } %>
16
+ return (
17
+ <View style={styles.getStartedContainer}>
18
+ <Text style={styles.getStartedText}>{title}</Text>
19
+ <View style={[styles.codeHighlightContainer, styles.homeScreenFilename]}>
20
+ <Text>{path}</Text>
21
+ </View>
22
+ <Text style={styles.getStartedText}>{description}</Text>
23
+ </View>
24
+ );
25
+ }
26
+
27
+ const styles = StyleSheet.create({
28
+ codeHighlightContainer: {
29
+ borderRadius: 3,
30
+ paddingHorizontal: 4,
31
+ },
32
+ getStartedContainer: {
33
+ alignItems: 'center',
34
+ marginHorizontal: 50,
35
+ },
36
+ getStartedText: {
37
+ fontSize: 17,
38
+ lineHeight: 24,
39
+ textAlign: 'center',
40
+ },
41
+ helpContainer: {
42
+ alignItems: 'center',
43
+ marginHorizontal: 20,
44
+ marginTop: 15,
45
+ },
46
+ helpLink: {
47
+ paddingVertical: 15,
48
+ },
49
+ helpLinkText: {
50
+ textAlign: 'center',
51
+ },
52
+ homeScreenFilename: {
53
+ marginVertical: 7,
54
+ },
55
+ });
@@ -0,0 +1,29 @@
1
+ import { forwardRef } from 'react';
2
+ import FontAwesome from '@expo/vector-icons/FontAwesome';
3
+ import { Pressable, StyleSheet } from 'react-native';
4
+
5
+ export const HeaderButton = forwardRef<typeof Pressable, { onPress?: () => void; }>(({ onPress }, ref) => {
6
+ return (
7
+ <Pressable onPress={onPress}>
8
+ {({ pressed }) => (
9
+ <FontAwesome
10
+ name="info-circle"
11
+ size={25}
12
+ color="gray"
13
+ style={[
14
+ styles.headerRight,
15
+ {
16
+ opacity: pressed ? 0.5 : 1,
17
+ },
18
+ ]}
19
+ />
20
+ )}
21
+ </Pressable>
22
+ );
23
+ });
24
+
25
+ export const styles = StyleSheet.create({
26
+ headerRight: {
27
+ marginRight: 15,
28
+ },
29
+ });
@@ -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
+ });
@@ -0,0 +1,15 @@
1
+ import FontAwesome from '@expo/vector-icons/FontAwesome';
2
+ import { StyleSheet } from 'react-native';
3
+
4
+ export const TabBarIcon = (props: {
5
+ name: React.ComponentProps<typeof FontAwesome>['name'];
6
+ color: string;
7
+ }) => {
8
+ return <FontAwesome size={28} style={styles.tabBarIcon} {...props} />;
9
+ };
10
+
11
+ export const styles = StyleSheet.create({
12
+ tabBarIcon: {
13
+ marginBottom: -3,
14
+ },
15
+ });
@@ -0,0 +1,28 @@
1
+ import { Tabs } from 'expo-router';
2
+
3
+ import { TabBarIcon } from '~/components/TabBarIcon';
4
+
5
+ export default function TabLayout() {
6
+ return (
7
+ <Tabs
8
+ screenOptions={{
9
+ headerShown: false,
10
+ tabBarActiveTintColor: 'black',
11
+ }}>
12
+ <Tabs.Screen
13
+ name="index"
14
+ options={{
15
+ title: 'Tab One',
16
+ tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
17
+ }}
18
+ />
19
+ <Tabs.Screen
20
+ name="two"
21
+ options={{
22
+ title: 'Tab Two',
23
+ tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
24
+ }}
25
+ />
26
+ </Tabs>
27
+ );
28
+ }