lovdacn 0.0.3 → 0.1.1

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 (120) hide show
  1. package/{templates/nativewind/LICENSE → LICENSE} +3 -3
  2. package/dist/index.js +77 -77
  3. package/package.json +51 -52
  4. package/templates/nativewind/.vscode/extensions.json +0 -1
  5. package/templates/nativewind/.vscode/settings.json +0 -7
  6. package/templates/nativewind/AGENTS.md +0 -3
  7. package/templates/nativewind/CLAUDE.md +0 -1
  8. package/templates/nativewind/README.md +0 -56
  9. package/templates/nativewind/app.json +0 -43
  10. package/templates/nativewind/assets/expo.icon/Assets/expo-symbol 2.svg +0 -3
  11. package/templates/nativewind/assets/expo.icon/Assets/grid.png +0 -0
  12. package/templates/nativewind/assets/expo.icon/icon.json +0 -40
  13. package/templates/nativewind/assets/images/android-icon-background.png +0 -0
  14. package/templates/nativewind/assets/images/android-icon-foreground.png +0 -0
  15. package/templates/nativewind/assets/images/android-icon-monochrome.png +0 -0
  16. package/templates/nativewind/assets/images/expo-badge-white.png +0 -0
  17. package/templates/nativewind/assets/images/expo-badge.png +0 -0
  18. package/templates/nativewind/assets/images/expo-logo.png +0 -0
  19. package/templates/nativewind/assets/images/favicon.png +0 -0
  20. package/templates/nativewind/assets/images/icon.png +0 -0
  21. package/templates/nativewind/assets/images/logo-glow.png +0 -0
  22. package/templates/nativewind/assets/images/react-logo.png +0 -0
  23. package/templates/nativewind/assets/images/react-logo@2x.png +0 -0
  24. package/templates/nativewind/assets/images/react-logo@3x.png +0 -0
  25. package/templates/nativewind/assets/images/splash-icon.png +0 -0
  26. package/templates/nativewind/assets/images/tabIcons/explore.png +0 -0
  27. package/templates/nativewind/assets/images/tabIcons/explore@2x.png +0 -0
  28. package/templates/nativewind/assets/images/tabIcons/explore@3x.png +0 -0
  29. package/templates/nativewind/assets/images/tabIcons/home.png +0 -0
  30. package/templates/nativewind/assets/images/tabIcons/home@2x.png +0 -0
  31. package/templates/nativewind/assets/images/tabIcons/home@3x.png +0 -0
  32. package/templates/nativewind/assets/images/tutorial-web.png +0 -0
  33. package/templates/nativewind/babel.config.js +0 -9
  34. package/templates/nativewind/expo-env.d.ts +0 -3
  35. package/templates/nativewind/lvcn.json +0 -16
  36. package/templates/nativewind/metro.config.js +0 -6
  37. package/templates/nativewind/nativewind-env.d.ts +0 -3
  38. package/templates/nativewind/package.json +0 -55
  39. package/templates/nativewind/postcss.config.js +0 -6
  40. package/templates/nativewind/scripts/reset-project.js +0 -114
  41. package/templates/nativewind/src/app/_layout.tsx +0 -25
  42. package/templates/nativewind/src/app/explore.tsx +0 -180
  43. package/templates/nativewind/src/app/index.tsx +0 -12
  44. package/templates/nativewind/src/components/animated-icon.module.css +0 -6
  45. package/templates/nativewind/src/components/animated-icon.tsx +0 -148
  46. package/templates/nativewind/src/components/animated-icon.web.tsx +0 -108
  47. package/templates/nativewind/src/components/app-tabs.tsx +0 -32
  48. package/templates/nativewind/src/components/app-tabs.web.tsx +0 -115
  49. package/templates/nativewind/src/components/external-link.tsx +0 -25
  50. package/templates/nativewind/src/components/hint-row.tsx +0 -35
  51. package/templates/nativewind/src/components/themed-text.tsx +0 -73
  52. package/templates/nativewind/src/components/themed-view.tsx +0 -16
  53. package/templates/nativewind/src/components/ui/button.tsx +0 -106
  54. package/templates/nativewind/src/components/ui/collapsible.tsx +0 -65
  55. package/templates/nativewind/src/components/ui/text.tsx +0 -89
  56. package/templates/nativewind/src/components/web-badge.tsx +0 -43
  57. package/templates/nativewind/src/constants/theme.ts +0 -65
  58. package/templates/nativewind/src/global.css +0 -13
  59. package/templates/nativewind/src/hooks/use-color-scheme.ts +0 -1
  60. package/templates/nativewind/src/hooks/use-color-scheme.web.ts +0 -21
  61. package/templates/nativewind/src/hooks/use-theme.ts +0 -14
  62. package/templates/nativewind/tailwind.config.js +0 -86
  63. package/templates/nativewind/tsconfig.json +0 -21
  64. package/templates/uniwind/.claude/settings.json +0 -5
  65. package/templates/uniwind/.vscode/extensions.json +0 -1
  66. package/templates/uniwind/.vscode/settings.json +0 -7
  67. package/templates/uniwind/AGENTS.md +0 -3
  68. package/templates/uniwind/CLAUDE.md +0 -1
  69. package/templates/uniwind/LICENSE +0 -21
  70. package/templates/uniwind/README.md +0 -56
  71. package/templates/uniwind/app.json +0 -42
  72. package/templates/uniwind/assets/expo.icon/Assets/expo-symbol 2.svg +0 -3
  73. package/templates/uniwind/assets/expo.icon/Assets/grid.png +0 -0
  74. package/templates/uniwind/assets/expo.icon/icon.json +0 -40
  75. package/templates/uniwind/assets/images/android-icon-background.png +0 -0
  76. package/templates/uniwind/assets/images/android-icon-foreground.png +0 -0
  77. package/templates/uniwind/assets/images/android-icon-monochrome.png +0 -0
  78. package/templates/uniwind/assets/images/expo-badge-white.png +0 -0
  79. package/templates/uniwind/assets/images/expo-badge.png +0 -0
  80. package/templates/uniwind/assets/images/expo-logo.png +0 -0
  81. package/templates/uniwind/assets/images/favicon.png +0 -0
  82. package/templates/uniwind/assets/images/icon.png +0 -0
  83. package/templates/uniwind/assets/images/logo-glow.png +0 -0
  84. package/templates/uniwind/assets/images/react-logo.png +0 -0
  85. package/templates/uniwind/assets/images/react-logo@2x.png +0 -0
  86. package/templates/uniwind/assets/images/react-logo@3x.png +0 -0
  87. package/templates/uniwind/assets/images/splash-icon.png +0 -0
  88. package/templates/uniwind/assets/images/tabIcons/explore.png +0 -0
  89. package/templates/uniwind/assets/images/tabIcons/explore@2x.png +0 -0
  90. package/templates/uniwind/assets/images/tabIcons/explore@3x.png +0 -0
  91. package/templates/uniwind/assets/images/tabIcons/home.png +0 -0
  92. package/templates/uniwind/assets/images/tabIcons/home@2x.png +0 -0
  93. package/templates/uniwind/assets/images/tabIcons/home@3x.png +0 -0
  94. package/templates/uniwind/assets/images/tutorial-web.png +0 -0
  95. package/templates/uniwind/expo-env.d.ts +0 -3
  96. package/templates/uniwind/lvcn.json +0 -16
  97. package/templates/uniwind/metro.config.js +0 -14
  98. package/templates/uniwind/package.json +0 -46
  99. package/templates/uniwind/scripts/reset-project.js +0 -114
  100. package/templates/uniwind/src/app/_layout.tsx +0 -23
  101. package/templates/uniwind/src/app/explore.tsx +0 -180
  102. package/templates/uniwind/src/app/index.tsx +0 -98
  103. package/templates/uniwind/src/components/animated-icon.module.css +0 -6
  104. package/templates/uniwind/src/components/animated-icon.tsx +0 -148
  105. package/templates/uniwind/src/components/animated-icon.web.tsx +0 -108
  106. package/templates/uniwind/src/components/app-tabs.tsx +0 -32
  107. package/templates/uniwind/src/components/app-tabs.web.tsx +0 -115
  108. package/templates/uniwind/src/components/external-link.tsx +0 -25
  109. package/templates/uniwind/src/components/hint-row.tsx +0 -35
  110. package/templates/uniwind/src/components/themed-text.tsx +0 -73
  111. package/templates/uniwind/src/components/themed-view.tsx +0 -16
  112. package/templates/uniwind/src/components/ui/collapsible.tsx +0 -65
  113. package/templates/uniwind/src/components/web-badge.tsx +0 -43
  114. package/templates/uniwind/src/constants/theme.ts +0 -65
  115. package/templates/uniwind/src/global.css +0 -12
  116. package/templates/uniwind/src/hooks/use-color-scheme.ts +0 -1
  117. package/templates/uniwind/src/hooks/use-color-scheme.web.ts +0 -21
  118. package/templates/uniwind/src/hooks/use-theme.ts +0 -14
  119. package/templates/uniwind/src/uniwind-types.d.ts +0 -10
  120. package/templates/uniwind/tsconfig.json +0 -20
package/package.json CHANGED
@@ -1,52 +1,51 @@
1
- {
2
- "name": "lovdacn",
3
- "type": "module",
4
- "version": "0.0.3",
5
- "private": false,
6
- "license": "MIT",
7
- "files": [
8
- "dist",
9
- "templates"
10
- ],
11
- "publishConfig": {
12
- "access": "public"
13
- },
14
- "exports": {
15
- ".": {
16
- "types": "./dist/index.d.ts",
17
- "default": "./dist/index.js"
18
- }
19
- },
20
- "bin": {
21
- "lovdacn": "./dist/index.js",
22
- "lvcn": "./dist/index.js"
23
- },
24
- "scripts": {
25
- "test": "vitest run",
26
- "build": "tsup && node -e \"const fs=require('fs-extra'); fs.removeSync('./templates'); fs.copySync('../templates', './templates', {filter: (src) => !src.includes('node_modules') && !src.includes('.expo') && !src.includes('.git') && !src.includes('package-lock.json') && !src.includes('bun.lock') && !src.includes('bun.lockb') && !src.includes('styles')})\"",
27
- "dev": "tsup --watch",
28
- "start": "node dist/index.js",
29
- "clean": "rimraf dist templates"
30
- },
31
- "devDependencies": {
32
- "@types/fs-extra": "^11.0.4",
33
- "@types/node": "^22",
34
- "@types/prompts": "^2.4.9",
35
- "rimraf": "^6.0.1",
36
- "tailwind-merge": "^3.6.0",
37
- "tsup": "^8.5.0",
38
- "vitest": "^3.0.0"
39
- },
40
- "peerDependencies": {
41
- "typescript": "^5"
42
- },
43
- "dependencies": {
44
- "commander": "^15.0.0",
45
- "execa": "^9.6.0",
46
- "fs-extra": "^11.3.1",
47
- "picocolors": "^1.1.1",
48
- "prompts": "^2.4.2",
49
- "zod": "^3.24.1"
50
- },
51
- "module": "src/index.ts"
52
- }
1
+ {
2
+ "name": "lovdacn",
3
+ "type": "module",
4
+ "version": "0.1.1",
5
+ "private": false,
6
+ "license": "MIT",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ }
18
+ },
19
+ "bin": {
20
+ "lovdacn": "./dist/index.js",
21
+ "lvcn": "./dist/index.js"
22
+ },
23
+ "devDependencies": {
24
+ "@types/fs-extra": "^11.0.4",
25
+ "@types/node": "^22",
26
+ "@types/prompts": "^2.4.9",
27
+ "rimraf": "^6.0.1",
28
+ "tailwind-merge": "^3.6.0",
29
+ "tsup": "^8.5.0",
30
+ "vitest": "^3.0.0"
31
+ },
32
+ "peerDependencies": {
33
+ "typescript": "^5"
34
+ },
35
+ "dependencies": {
36
+ "commander": "^15.0.0",
37
+ "execa": "^9.6.0",
38
+ "fs-extra": "^11.3.1",
39
+ "picocolors": "^1.1.1",
40
+ "prompts": "^2.4.2",
41
+ "zod": "^3.24.1"
42
+ },
43
+ "module": "src/index.ts",
44
+ "scripts": {
45
+ "test": "vitest run",
46
+ "build": "tsup",
47
+ "dev": "tsup --watch",
48
+ "start": "node dist/index.js",
49
+ "clean": "rimraf dist"
50
+ }
51
+ }
@@ -1 +0,0 @@
1
- { "recommendations": ["expo.vscode-expo-tools"] }
@@ -1,7 +0,0 @@
1
- {
2
- "editor.codeActionsOnSave": {
3
- "source.fixAll": "explicit",
4
- "source.organizeImports": "explicit",
5
- "source.sortMembers": "explicit"
6
- }
7
- }
@@ -1,3 +0,0 @@
1
- # Expo HAS CHANGED
2
-
3
- Read the exact versioned docs at https://docs.expo.dev/versions/v57.0.0/ before writing any code.
@@ -1 +0,0 @@
1
- @AGENTS.md
@@ -1,56 +0,0 @@
1
- # Welcome to your Expo app šŸ‘‹
2
-
3
- This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).
4
-
5
- ## Get started
6
-
7
- 1. Install dependencies
8
-
9
- ```bash
10
- npm install
11
- ```
12
-
13
- 2. Start the app
14
-
15
- ```bash
16
- npx expo start
17
- ```
18
-
19
- In the output, you'll find options to open the app in a
20
-
21
- - [development build](https://docs.expo.dev/develop/development-builds/introduction/)
22
- - [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
23
- - [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
24
- - [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo
25
-
26
- You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
27
-
28
- ## Get a fresh project
29
-
30
- When you're ready, run:
31
-
32
- ```bash
33
- npm run reset-project
34
- ```
35
-
36
- This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.
37
-
38
- ### Other setup steps
39
-
40
- - To set up ESLint for linting, run `npx expo lint`, or follow our guide on ["Using ESLint and Prettier"](https://docs.expo.dev/guides/using-eslint/)
41
- - If you'd like to set up unit testing, follow our guide on ["Unit Testing with Jest"](https://docs.expo.dev/develop/unit-testing/)
42
- - Learn more about the TypeScript setup in this template in our guide on ["Using TypeScript"](https://docs.expo.dev/guides/typescript/)
43
-
44
- ## Learn more
45
-
46
- To learn more about developing your project with Expo, look at the following resources:
47
-
48
- - [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
49
- - [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
50
-
51
- ## Join the community
52
-
53
- Join our community of developers creating universal apps.
54
-
55
- - [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
56
- - [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.
@@ -1,43 +0,0 @@
1
- {
2
- "expo": {
3
- "name": "oooooo",
4
- "slug": "oooooo",
5
- "version": "1.0.0",
6
- "orientation": "portrait",
7
- "icon": "./assets/images/icon.png",
8
- "scheme": "oooooo",
9
- "userInterfaceStyle": "automatic",
10
- "ios": {
11
- "icon": "./assets/expo.icon"
12
- },
13
- "android": {
14
- "adaptiveIcon": {
15
- "backgroundColor": "#E6F4FE",
16
- "foregroundImage": "./assets/images/android-icon-foreground.png",
17
- "backgroundImage": "./assets/images/android-icon-background.png",
18
- "monochromeImage": "./assets/images/android-icon-monochrome.png"
19
- },
20
- "predictiveBackGestureEnabled": false
21
- },
22
- "web": {
23
- "output": "static",
24
- "favicon": "./assets/images/favicon.png",
25
- "bundler": "metro"
26
- },
27
- "plugins": [
28
- "expo-router",
29
- [
30
- "expo-splash-screen",
31
- {
32
- "backgroundColor": "#208AEF",
33
- "image": "./assets/images/splash-icon.png",
34
- "imageWidth": 76
35
- }
36
- ]
37
- ],
38
- "experiments": {
39
- "typedRoutes": true,
40
- "reactCompiler": true
41
- }
42
- }
43
- }
@@ -1,3 +0,0 @@
1
- <svg width="652" height="606" viewBox="0 0 652 606" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M353.554 0H298.446C273.006 0 249.684 14.6347 237.962 37.9539L4.37994 502.646C-1.04325 513.435 -1.45067 526.178 3.2716 537.313L22.6123 582.918C34.6475 611.297 72.5404 614.156 88.4414 587.885L309.863 222.063C313.34 216.317 319.439 212.826 326 212.826C332.561 212.826 338.659 216.317 342.137 222.063L563.559 587.885C579.46 614.156 617.352 611.297 629.388 582.918L648.728 537.313C653.451 526.178 653.043 513.435 647.62 502.646L414.038 37.9539C402.316 14.6347 378.994 0 353.554 0Z" fill="white"/>
3
- </svg>
@@ -1,40 +0,0 @@
1
- {
2
- "fill" : {
3
- "automatic-gradient" : "extended-srgb:0.00000,0.47843,1.00000,1.00000"
4
- },
5
- "groups" : [
6
- {
7
- "layers" : [
8
- {
9
- "image-name" : "expo-symbol 2.svg",
10
- "name" : "expo-symbol 2",
11
- "position" : {
12
- "scale" : 1,
13
- "translation-in-points" : [
14
- 1.1008400065293245e-05,
15
- -16.046875
16
- ]
17
- }
18
- },
19
- {
20
- "image-name" : "grid.png",
21
- "name" : "grid"
22
- }
23
- ],
24
- "shadow" : {
25
- "kind" : "neutral",
26
- "opacity" : 0.5
27
- },
28
- "translucency" : {
29
- "enabled" : true,
30
- "value" : 0.5
31
- }
32
- }
33
- ],
34
- "supported-platforms" : {
35
- "circles" : [
36
- "watchOS"
37
- ],
38
- "squares" : "shared"
39
- }
40
- }
@@ -1,9 +0,0 @@
1
- module.exports = function (api) {
2
- api.cache(true);
3
- return {
4
- presets: [
5
- ["babel-preset-expo", { jsxImportSource: "nativewind" }],
6
- "nativewind/babel",
7
- ],
8
- };
9
- };
@@ -1,3 +0,0 @@
1
- /// <reference types="expo/types" />
2
-
3
- // NOTE: This file should not be edited and should be in your git ignore
@@ -1,16 +0,0 @@
1
- {
2
- "$schema": "https://lovdacn.vercel.app/schema.json",
3
- "style": "new-york",
4
- "styleEngine": "nativewind",
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "tailwind.config.js",
8
- "css": "src/global.css"
9
- },
10
- "aliases": {
11
- "components": "@/components",
12
- "utils": "@/lib/utils",
13
- "ui": "@/components/ui"
14
- },
15
- "components": []
16
- }
@@ -1,6 +0,0 @@
1
- const { getDefaultConfig } = require("expo/metro-config");
2
- const { withNativeWind } = require('nativewind/metro');
3
-
4
- const config = getDefaultConfig(__dirname)
5
-
6
- module.exports = withNativeWind(config, { input: './src/global.css' })
@@ -1,3 +0,0 @@
1
- /// <reference types="nativewind/types" />
2
-
3
- // NOTE: This file should not be edited and should be committed with your source code. It is generated by NativeWind.
@@ -1,55 +0,0 @@
1
- {
2
- "name": "oooooo",
3
- "main": "expo-router/entry",
4
- "version": "1.0.0",
5
- "dependencies": {
6
- "@expo/ui": "~57.0.4",
7
- "@rn-primitives/portal": "^1.5.2",
8
- "@rn-primitives/slot": "^1.5.2",
9
- "class-variance-authority": "^0.7.1",
10
- "clsx": "^2.1.1",
11
- "expo": "~57.0.4",
12
- "expo-constants": "~57.0.3",
13
- "expo-device": "~57.0.0",
14
- "expo-font": "~57.0.0",
15
- "expo-glass-effect": "~57.0.0",
16
- "expo-image": "~57.0.0",
17
- "expo-linking": "~57.0.2",
18
- "expo-router": "~57.0.4",
19
- "expo-splash-screen": "~57.0.2",
20
- "expo-status-bar": "~57.0.0",
21
- "expo-symbols": "~57.0.0",
22
- "expo-system-ui": "~57.0.0",
23
- "expo-web-browser": "~57.0.0",
24
- "nativewind": "^4.2.6",
25
- "react": "19.2.3",
26
- "react-dom": "19.2.3",
27
- "react-native": "0.86.0",
28
- "react-native-gesture-handler": "~2.32.0",
29
- "react-native-reanimated": "4.5.0",
30
- "react-native-safe-area-context": "~5.7.0",
31
- "react-native-screens": "4.25.2",
32
- "react-native-web": "~0.21.0",
33
- "react-native-worklets": "0.10.0",
34
- "tailwind-merge": "^3.6.0",
35
- "tailwindcss-animate": "^1.0.7"
36
- },
37
- "devDependencies": {
38
- "@types/react": "~19.2.2",
39
- "autoprefixer": "^10.5.2",
40
- "babel-preset-expo": "^57.0.1",
41
- "postcss": "^8.5.16",
42
- "prettier-plugin-tailwindcss": "^0.5.14",
43
- "tailwindcss": "3.4.17",
44
- "typescript": "~6.0.3"
45
- },
46
- "scripts": {
47
- "start": "expo start",
48
- "reset-project": "node ./scripts/reset-project.js",
49
- "android": "expo start --android",
50
- "ios": "expo start --ios",
51
- "web": "expo start --web",
52
- "lint": "expo lint"
53
- },
54
- "private": true
55
- }
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {},
5
- },
6
- }
@@ -1,114 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * This script is used to reset the project to a blank state.
5
- * It deletes or moves the /src and /scripts directories to /example based on user input and creates a new /src/app directory with an index.tsx and _layout.tsx file.
6
- * You can remove the `reset-project` script from package.json and safely delete this file after running it.
7
- */
8
-
9
- const fs = require("fs");
10
- const path = require("path");
11
- const readline = require("readline");
12
-
13
- const root = process.cwd();
14
- const oldDirs = ["src", "scripts"];
15
- const exampleDir = "example";
16
- const newAppDir = "src/app";
17
- const exampleDirPath = path.join(root, exampleDir);
18
-
19
- const indexContent = `import { Text, View, StyleSheet } from "react-native";
20
-
21
- export default function Index() {
22
- return (
23
- <View style={styles.container}>
24
- <Text>Edit src/app/index.tsx to edit this screen.</Text>
25
- </View>
26
- );
27
- }
28
-
29
- const styles = StyleSheet.create({
30
- container: {
31
- flex: 1,
32
- alignItems: "center",
33
- justifyContent: "center",
34
- },
35
- });
36
- `;
37
-
38
- const layoutContent = `import { Stack } from "expo-router";
39
-
40
- export default function RootLayout() {
41
- return <Stack />;
42
- }
43
- `;
44
-
45
- const rl = readline.createInterface({
46
- input: process.stdin,
47
- output: process.stdout,
48
- });
49
-
50
- const moveDirectories = async (userInput) => {
51
- try {
52
- if (userInput === "y") {
53
- // Create the app-example directory
54
- await fs.promises.mkdir(exampleDirPath, { recursive: true });
55
- console.log(`šŸ“ /${exampleDir} directory created.`);
56
- }
57
-
58
- // Move old directories to new app-example directory or delete them
59
- for (const dir of oldDirs) {
60
- const oldDirPath = path.join(root, dir);
61
- if (fs.existsSync(oldDirPath)) {
62
- if (userInput === "y") {
63
- const newDirPath = path.join(root, exampleDir, dir);
64
- await fs.promises.rename(oldDirPath, newDirPath);
65
- console.log(`āž”ļø /${dir} moved to /${exampleDir}/${dir}.`);
66
- } else {
67
- await fs.promises.rm(oldDirPath, { recursive: true, force: true });
68
- console.log(`āŒ /${dir} deleted.`);
69
- }
70
- } else {
71
- console.log(`āž”ļø /${dir} does not exist, skipping.`);
72
- }
73
- }
74
-
75
- // Create new /src/app directory
76
- const newAppDirPath = path.join(root, newAppDir);
77
- await fs.promises.mkdir(newAppDirPath, { recursive: true });
78
- console.log("\nšŸ“ New /src/app directory created.");
79
-
80
- // Create index.tsx
81
- const indexPath = path.join(newAppDirPath, "index.tsx");
82
- await fs.promises.writeFile(indexPath, indexContent);
83
- console.log("šŸ“„ src/app/index.tsx created.");
84
-
85
- // Create _layout.tsx
86
- const layoutPath = path.join(newAppDirPath, "_layout.tsx");
87
- await fs.promises.writeFile(layoutPath, layoutContent);
88
- console.log("šŸ“„ src/app/_layout.tsx created.");
89
-
90
- console.log("\nāœ… Project reset complete. Next steps:");
91
- console.log(
92
- `1. Run \`npx expo start\` to start a development server.\n2. Edit src/app/index.tsx to edit the main screen.\n3. Put all your application code in /src, only screens and layout files should be in /src/app.${
93
- userInput === "y"
94
- ? `\n4. Delete the /${exampleDir} directory when you're done referencing it.`
95
- : ""
96
- }`
97
- );
98
- } catch (error) {
99
- console.error(`āŒ Error during script execution: ${error.message}`);
100
- }
101
- };
102
-
103
- rl.question(
104
- "Do you want to move existing files to /example instead of deleting them? (Y/n): ",
105
- (answer) => {
106
- const userInput = answer.trim().toLowerCase() || "y";
107
- if (userInput === "y" || userInput === "n") {
108
- moveDirectories(userInput).finally(() => rl.close());
109
- } else {
110
- console.log("āŒ Invalid input. Please enter 'Y' or 'N'.");
111
- rl.close();
112
- }
113
- }
114
- );
@@ -1,25 +0,0 @@
1
- import { DarkTheme, DefaultTheme, ThemeProvider } from 'expo-router';
2
- import { PortalHost } from '@rn-primitives/portal';
3
- import * as SplashScreen from 'expo-splash-screen';
4
- import { useColorScheme } from 'react-native';
5
- import { GestureHandlerRootView } from 'react-native-gesture-handler';
6
-
7
- import { AnimatedSplashOverlay } from '@/components/animated-icon';
8
- import AppTabs from '@/components/app-tabs';
9
-
10
- import "../global.css";
11
-
12
- SplashScreen.preventAutoHideAsync();
13
-
14
- export default function TabLayout() {
15
- const colorScheme = useColorScheme();
16
- return (
17
- <GestureHandlerRootView style={{ flex: 1 }}>
18
- <ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
19
- <AnimatedSplashOverlay />
20
- <AppTabs />
21
- <PortalHost />
22
- </ThemeProvider>
23
- </GestureHandlerRootView>
24
- );
25
- }