create-expo-stack 2.7.0-next.e19c886 → 2.7.0

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 (41) hide show
  1. package/README.md +10 -10
  2. package/build/commands/create-expo-stack.js +62 -15
  3. package/build/templates/base/app.json.ejs +5 -1
  4. package/build/templates/base/package.json.ejs +32 -3
  5. package/build/templates/base/tsconfig.json.ejs +1 -1
  6. package/build/templates/packages/nativewindui/app/+not-found.tsx.ejs +1 -1
  7. package/build/templates/packages/nativewindui/app/_layout.tsx.ejs +26 -19
  8. package/build/templates/packages/nativewindui/app/index.tsx.ejs +665 -123
  9. package/build/templates/packages/nativewindui/app/modal.tsx.ejs +20 -19
  10. package/build/templates/packages/nativewindui/components/nativewind-ui/ActivityIndicator.tsx.ejs +10 -0
  11. package/build/templates/packages/nativewindui/components/nativewind-ui/Avatar.tsx.ejs +139 -0
  12. package/build/templates/packages/nativewindui/components/nativewind-ui/DatePicker.android.tsx.ejs +66 -0
  13. package/build/templates/packages/nativewindui/components/nativewind-ui/DatePicker.tsx.ejs +10 -0
  14. package/build/templates/packages/nativewindui/components/nativewind-ui/Picker.tsx.ejs +39 -0
  15. package/build/templates/packages/nativewindui/components/nativewind-ui/ProgressIndicator.tsx.ejs +95 -0
  16. package/build/templates/packages/nativewindui/components/nativewind-ui/SegmentedControl.tsx.ejs +22 -0
  17. package/build/templates/packages/nativewindui/components/nativewind-ui/Sheet.tsx.ejs +59 -0
  18. package/build/templates/packages/nativewindui/components/nativewind-ui/Slider.tsx.ejs +28 -0
  19. package/build/templates/packages/nativewindui/components/{Text.tsx.ejs → nativewind-ui/Text.tsx.ejs} +26 -2
  20. package/build/templates/packages/nativewindui/components/{ThemeToggle.tsx.ejs → nativewind-ui/ThemeToggle.tsx.ejs} +6 -10
  21. package/build/templates/packages/nativewindui/components/{Toggle.tsx.ejs → nativewind-ui/Toggle.tsx.ejs} +3 -3
  22. package/build/templates/packages/nativewindui/global.css.ejs +3 -3
  23. package/build/templates/packages/nativewindui/lib/useColorScheme.tsx.ejs +44 -3
  24. package/build/templates/packages/nativewindui/lib/useHeaderSearchBar.tsx.ejs +2 -2
  25. package/build/templates/packages/nativewindui/theme/colors.ts.ejs +8 -8
  26. package/build/templates/packages/nativewindui/theme/index.ts.ejs +4 -4
  27. package/build/types/types.d.ts +2 -0
  28. package/build/types/utilities/clearNavigationPackages.d.ts +2 -0
  29. package/build/utilities/clearNavigationPackages.js +11 -0
  30. package/build/utilities/configureProjectFiles.js +64 -35
  31. package/build/utilities/runCLI.js +80 -26
  32. package/package.json +67 -67
  33. package/build/templates/packages/nativewindui/app/bottom-tabs/_layout.tsx.ejs +0 -34
  34. package/build/templates/packages/nativewindui/app/bottom-tabs/index.tsx.ejs +0 -11
  35. package/build/templates/packages/nativewindui/app/bottom-tabs/profile.tsx.ejs +0 -11
  36. package/build/templates/packages/nativewindui/app/drawer/_layout.tsx.ejs +0 -29
  37. package/build/templates/packages/nativewindui/app/drawer/index.tsx.ejs +0 -11
  38. package/build/templates/packages/nativewindui/app/top-tabs/_layout.tsx.ejs +0 -71
  39. package/build/templates/packages/nativewindui/app/top-tabs/following.tsx.ejs +0 -13
  40. package/build/templates/packages/nativewindui/app/top-tabs/index.tsx.ejs +0 -13
  41. package/build/templates/packages/nativewindui/app/top-tabs/my-group.tsx.ejs +0 -13
package/package.json CHANGED
@@ -1,69 +1,69 @@
1
1
  {
2
- "name": "create-expo-stack",
3
- "version": "2.7.0-next.e19c886",
4
- "description": "CLI tool to initialize a React Native application with Expo",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/danstepanov/create-expo-stack.git",
8
- "directory": "cli"
9
- },
10
- "homepage": "https://createexpostack.com",
11
- "license": "MIT",
12
- "types": "build/types/types.d.ts",
13
- "bin": {
14
- "create-expo-stack": "bin/create-expo-stack.js"
15
- },
16
- "files": [
17
- "build",
18
- "LICENSE",
19
- "readme.md",
20
- "docs",
21
- "bin"
22
- ],
23
- "scripts": {
24
- "build": "bun run clean-build && bun run compile && bun run copy-templates && bun run lint-templates",
25
- "bump": "bun run ./src/utilities/bumpVersion.ts",
26
- "clean-build": "rm -rf ./build",
27
- "compile": "tsc -p .",
28
- "copy-templates": "bun run copyfiles -u 2 -a \"./src/templates/**/*\" ./build/templates",
29
- "format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix --resolve-plugins-relative-to . && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
30
- "lint-templates": "bun run ejslint ./src/templates",
31
- "prepublishOnly": "bun run build",
32
- "publishPublic": "bun run build && npm publish --access public",
33
- "snapupdate": "jest --updateSnapshot",
34
- "test:watch": "bun test --watch",
35
- "test": "bun test --timeout 30000"
36
- },
37
- "prettier": {
38
- "arrowParens": "always",
39
- "bracketSameLine": false,
40
- "bracketSpacing": true,
41
- "printWidth": 120,
42
- "semi": true,
43
- "singleQuote": true,
44
- "tabWidth": 2,
45
- "trailingComma": "none",
46
- "useTabs": false
47
- },
48
- "dependencies": {
49
- "@clack/prompts": "^0.7.0",
50
- "ejs-lint": "^2.0.0",
51
- "figlet": "^1.6.0",
52
- "gluegun": "latest",
53
- "gradient-string": "^2.0.2"
54
- },
55
- "devDependencies": {
56
- "@types/gradient-string": "^1.1.2",
57
- "@typescript-eslint/eslint-plugin": "^6.9.1",
58
- "@typescript-eslint/parser": "^6.9.1",
59
- "copyfiles": "^2.4.1",
60
- "eslint": "^8.53.0",
61
- "eslint-config-prettier": "^9.0.0",
62
- "eslint-plugin-prettier": "^5.0.1",
63
- "husky": "^5.1.3",
64
- "prettier": "^3.1.0"
65
- },
66
- "publishConfig": {
67
- "provenance": false
68
- }
2
+ "name": "create-expo-stack",
3
+ "version": "2.7.0",
4
+ "description": "CLI tool to initialize a React Native application with Expo",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/danstepanov/create-expo-stack.git",
8
+ "directory": "cli"
9
+ },
10
+ "homepage": "https://createexpostack.com",
11
+ "license": "MIT",
12
+ "types": "build/types/types.d.ts",
13
+ "bin": {
14
+ "create-expo-stack": "bin/create-expo-stack.js"
15
+ },
16
+ "files": [
17
+ "build",
18
+ "LICENSE",
19
+ "readme.md",
20
+ "docs",
21
+ "bin"
22
+ ],
23
+ "scripts": {
24
+ "build": "bun run clean-build && bun run compile && bun run copy-templates && bun run lint-templates",
25
+ "bump": "bun run ./src/utilities/bumpVersion.ts",
26
+ "clean-build": "rm -rf ./build",
27
+ "compile": "tsc -p .",
28
+ "copy-templates": "bun run copyfiles -u 2 -a \"./src/templates/**/*\" ./build/templates",
29
+ "format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix --resolve-plugins-relative-to . && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
30
+ "lint-templates": "bun run ejslint ./src/templates",
31
+ "prepublishOnly": "bun run build",
32
+ "publishPublic": "bun run build && npm publish --access public",
33
+ "snapupdate": "jest --updateSnapshot",
34
+ "test:watch": "bun test --watch",
35
+ "test": "bun test --timeout 30000"
36
+ },
37
+ "prettier": {
38
+ "arrowParens": "always",
39
+ "bracketSameLine": false,
40
+ "bracketSpacing": true,
41
+ "printWidth": 120,
42
+ "semi": true,
43
+ "singleQuote": true,
44
+ "tabWidth": 2,
45
+ "trailingComma": "none",
46
+ "useTabs": false
47
+ },
48
+ "dependencies": {
49
+ "@clack/prompts": "^0.7.0",
50
+ "ejs-lint": "^2.0.0",
51
+ "figlet": "^1.6.0",
52
+ "gluegun": "latest",
53
+ "gradient-string": "^2.0.2"
54
+ },
55
+ "devDependencies": {
56
+ "@types/gradient-string": "^1.1.2",
57
+ "@typescript-eslint/eslint-plugin": "^6.9.1",
58
+ "@typescript-eslint/parser": "^6.9.1",
59
+ "copyfiles": "^2.4.1",
60
+ "eslint": "^8.53.0",
61
+ "eslint-config-prettier": "^9.0.0",
62
+ "eslint-plugin-prettier": "^5.0.1",
63
+ "husky": "^5.1.3",
64
+ "prettier": "^3.1.0"
65
+ },
66
+ "publishConfig": {
67
+ "provenance": false
68
+ }
69
69
  }
@@ -1,34 +0,0 @@
1
- import { ThemeToggle } from '@/components/ThemeToggle';
2
- import { Icon } from '@roninoss/icons';
3
- import { Tabs } from 'expo-router';
4
- import { View } from 'react-native';
5
-
6
- export default function TabsLayout() {
7
- return (
8
- <Tabs screenOptions={SCREEN_OPTIONS}>
9
- <Tabs.Screen name='index' options={INDEX_OPTIONS} />
10
- <Tabs.Screen name='profile' options={PROFILE_OPTIONS} />
11
- </Tabs>
12
- );
13
- }
14
- const SCREEN_OPTIONS = {
15
- headerRight: () => (
16
- <View className='px-4'>
17
- <ThemeToggle />
18
- </View>
19
- ),
20
- };
21
-
22
- const INDEX_OPTIONS = {
23
- title: 'Home',
24
- tabBarIcon({ color, size }: { color: string; size: number }) {
25
- return <Icon name='home' color={color} size={size} />;
26
- },
27
- };
28
-
29
- const PROFILE_OPTIONS = {
30
- title: 'Profile',
31
- tabBarIcon({ color, size }: { color: string; size: number }) {
32
- return <Icon name='person' color={color} size={size} />;
33
- },
34
- };
@@ -1,11 +0,0 @@
1
- import { router } from 'expo-router';
2
- import * as React from 'react';
3
- import { Button, View } from 'react-native';
4
-
5
- export default function HomeScreen() {
6
- return (
7
- <View className='flex-1 justify-center items-center'>
8
- <Button title='Go back' onPress={router.back} />
9
- </View>
10
- );
11
- }
@@ -1,11 +0,0 @@
1
- import { router } from 'expo-router';
2
- import * as React from 'react';
3
- import { Button, View } from 'react-native';
4
-
5
- export default function ProfileScreen() {
6
- return (
7
- <View className='flex-1 justify-center items-center'>
8
- <Button color={'orange'} title='Go to home tab' onPress={router.back} />
9
- </View>
10
- );
11
- }
@@ -1,29 +0,0 @@
1
- import { ThemeToggle } from '@/components/ThemeToggle';
2
- import { useColorScheme } from '@/lib/useColorScheme';
3
- import { Drawer } from 'expo-router/drawer';
4
- import { View } from 'react-native';
5
-
6
- export default function DrawerLayout() {
7
- const { colors } = useColorScheme();
8
- return (
9
- <Drawer
10
- screenOptions={{
11
- headerTintColor: colors.foreground,
12
- headerRight,
13
- }}
14
- >
15
- <Drawer.Screen name='index' options={EXPLORE_OPTIONS} />
16
- </Drawer>
17
- );
18
- }
19
-
20
- function headerRight() {
21
- return (
22
- <View className='px-4'>
23
- <ThemeToggle />
24
- </View>
25
- );
26
- }
27
- const EXPLORE_OPTIONS = {
28
- title: 'Explore',
29
- };
@@ -1,11 +0,0 @@
1
- import { router } from 'expo-router';
2
- import * as React from 'react';
3
- import { Button, View } from 'react-native';
4
-
5
- export default function ExploreScreen() {
6
- return (
7
- <View className='flex-1 justify-center items-center'>
8
- <Button title='Go back' onPress={router.back} />
9
- </View>
10
- );
11
- }
@@ -1,71 +0,0 @@
1
- import { useColorScheme } from '@/lib/useColorScheme';
2
- import type {
3
- MaterialTopTabNavigationEventMap,
4
- MaterialTopTabNavigationOptions,
5
- } from '@react-navigation/material-top-tabs';
6
- import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
7
- import {
8
- type ParamListBase,
9
- type TabNavigationState,
10
- } from '@react-navigation/native';
11
- import { withLayoutContext } from 'expo-router';
12
- import { Dimensions } from 'react-native';
13
-
14
- const { width } = Dimensions.get('screen');
15
-
16
- const { Navigator } = createMaterialTopTabNavigator();
17
-
18
- const TopTabs = withLayoutContext<
19
- MaterialTopTabNavigationOptions,
20
- typeof Navigator,
21
- TabNavigationState<ParamListBase>,
22
- MaterialTopTabNavigationEventMap
23
- >(Navigator);
24
-
25
- const SCREENS = [
26
- {
27
- name: 'index',
28
- title: 'For You',
29
- },
30
- {
31
- name: 'following',
32
- title: 'Following',
33
- },
34
- {
35
- name: 'my-group',
36
- title: 'My Group',
37
- },
38
- ];
39
-
40
- export default function TopTabsLayout() {
41
- const { colors } = useColorScheme();
42
- return (
43
- <TopTabs
44
- initialRouteName='index'
45
- screenOptions={{
46
- tabBarActiveTintColor: colors.blue,
47
- tabBarInactiveTintColor: 'grey',
48
- tabBarLabelStyle: {
49
- fontSize: 14,
50
- textTransform: 'capitalize',
51
- fontWeight: 'bold',
52
- },
53
- tabBarIndicatorStyle: {
54
- backgroundColor: colors.blue,
55
- },
56
- tabBarScrollEnabled: true,
57
- tabBarItemStyle: { width: width / SCREENS.length },
58
- }}
59
- >
60
- {SCREENS.map(({ name, title }) => (
61
- <TopTabs.Screen
62
- key={name}
63
- name={name}
64
- options={{
65
- title,
66
- }}
67
- />
68
- ))}
69
- </TopTabs>
70
- );
71
- }
@@ -1,13 +0,0 @@
1
- import { Text } from '@/components/Text';
2
- import { View } from 'react-native';
3
-
4
- export default function FollowingScreen() {
5
- return (
6
- <View className='flex-1 justify-center items-center gap-5'>
7
- <View className='items-center gap-1'>
8
- <Text variant='title1'>Following Tab</Text>
9
- <Text>Swipe to see other tabs</Text>
10
- </View>
11
- </View>
12
- );
13
- }
@@ -1,13 +0,0 @@
1
- import { Text } from '@/components/Text';
2
- import { View } from 'react-native';
3
-
4
- export default function ForYouScreen() {
5
- return (
6
- <View className='flex-1 justify-center items-center gap-5'>
7
- <View className='items-center gap-1'>
8
- <Text variant='title1'>For You Tab</Text>
9
- <Text>Swipe to see other tabs</Text>
10
- </View>
11
- </View>
12
- );
13
- }
@@ -1,13 +0,0 @@
1
- import { View } from 'react-native';
2
- import { Text } from '@/components/Text';
3
-
4
- export default function MyGroupScreen() {
5
- return (
6
- <View className='flex-1 justify-center items-center gap-5'>
7
- <View className='items-center gap-1'>
8
- <Text variant='title1'>My Group Tab</Text>
9
- <Text>Swipe to see other tabs</Text>
10
- </View>
11
- </View>
12
- );
13
- }