nx-react-native-cli 1.1.0 → 2.0.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 (57) hide show
  1. package/README.md +69 -21
  2. package/lib/index.cjs +49 -39
  3. package/package.json +1 -1
  4. package/templates/.husky/pre-commit +0 -3
  5. package/templates/.husky/pre-push +0 -3
  6. package/templates/.vscode/settings.json +2 -5
  7. package/templates/apps/mobile/.eslintrc.json +4 -1
  8. package/templates/apps/mobile/Gemfile +5 -0
  9. package/templates/apps/mobile/android/app/build.gradle +3 -3
  10. package/templates/apps/mobile/android/app/src/main/java/com/appsmobile/MainActivity.kt +28 -0
  11. package/templates/apps/mobile/android/app/src/main/java/com/appsmobile/MainApplication.kt +2 -1
  12. package/templates/apps/mobile/android/build.gradle +3 -3
  13. package/templates/apps/mobile/android/gradle/wrapper/gradle-wrapper.properties +2 -2
  14. package/templates/apps/mobile/android/gradlew +4 -2
  15. package/templates/apps/mobile/android/gradlew.bat +2 -0
  16. package/templates/apps/mobile/babel.config.json +23 -0
  17. package/templates/apps/mobile/fastlane/.env.template +7 -2
  18. package/templates/apps/mobile/fastlane/Fastfile +46 -5
  19. package/templates/apps/mobile/fastlane/Matchfile +3 -3
  20. package/templates/apps/mobile/ios/AppDelegate.mm +33 -0
  21. package/templates/apps/mobile/metro.config.js +42 -0
  22. package/templates/apps/mobile/package.json +2 -3
  23. package/templates/apps/mobile/project.json +2 -1
  24. package/templates/apps/mobile/src/app/index.tsx +22 -7
  25. package/templates/apps/mobile/src/components/atoms/BottomSheet/bottom-sheet.component.tsx +9 -4
  26. package/templates/apps/mobile/src/components/atoms/Button/button.component.tsx +3 -3
  27. package/templates/apps/mobile/src/components/atoms/Divider/divider-component.tsx +3 -3
  28. package/templates/apps/mobile/src/components/atoms/ExcludedEdges/excluded-edges.component.tsx +2 -2
  29. package/templates/apps/mobile/src/components/atoms/InputLayout/input-layout.component.tsx +3 -3
  30. package/templates/apps/mobile/src/components/atoms/KeyboardAwareScrollView/keyboard-aware-scroll-view.component.tsx +11 -5
  31. package/templates/apps/mobile/src/components/atoms/ListLoadingItem/list-loading-item.component.tsx +4 -4
  32. package/templates/apps/mobile/src/components/atoms/Modal/modal.component.tsx +2 -2
  33. package/templates/apps/mobile/src/components/atoms/ScreenLoader/screen-loader.component.tsx +2 -2
  34. package/templates/apps/mobile/src/components/atoms/Skeleton/skeleton.component.tsx +7 -6
  35. package/templates/apps/mobile/src/components/atoms/TextInput/text-input.component.tsx +6 -4
  36. package/templates/apps/mobile/src/components/atoms/Typography/typography.component.tsx +2 -2
  37. package/templates/apps/mobile/src/components/molecules/BackButton/back-button.component.tsx +5 -5
  38. package/templates/apps/mobile/src/components/molecules/BottomActionsContainer/BottomActionsContainer.component.tsx +2 -2
  39. package/templates/apps/mobile/src/components/molecules/ScreenContainer/screen-container.component.tsx +11 -12
  40. package/templates/apps/mobile/src/components/molecules/ScreenHeader/screen-header.component.tsx +5 -5
  41. package/templates/apps/mobile/src/components/molecules/StorageManager/StorageManager.component.tsx +3 -1
  42. package/templates/apps/mobile/src/hooks/useGetLayoutHeight.hook.tsx +1 -1
  43. package/templates/apps/mobile/src/hooks/useGetLayoutWidth.hook.tsx +1 -1
  44. package/templates/apps/mobile/src/hooks/useNavigation.hook.tsx +1 -1
  45. package/templates/apps/mobile/src/hooks/useTextInputChangeFocus.hook.tsx +2 -2
  46. package/templates/apps/mobile/src/hooks/useToggleDarkMode.hook.tsx +1 -1
  47. package/templates/apps/mobile/src/main.tsx +1 -1
  48. package/templates/apps/mobile/src/routes/index.tsx +7 -7
  49. package/templates/apps/mobile/src/routes/privateRoutes.tsx +3 -4
  50. package/templates/apps/mobile/src/routes/publicRoutes.tsx +3 -4
  51. package/templates/apps/mobile/src/screens/HomeScreen/home.screen.tsx +3 -2
  52. package/templates/apps/mobile/src/screens/LandingScreen/landing.screen.tsx +12 -7
  53. package/templates/apps/mobile/src/stores/local-storage.store.ts +1 -1
  54. package/templates/apps/mobile/src/stores/mmkvStorage.ts +1 -1
  55. package/templates/apps/mobile/tsconfig.app.json +5 -1
  56. package/templates/clean-generated-outputs.sh +1 -1
  57. package/templates/apps/mobile/.env +0 -3
package/README.md CHANGED
@@ -1,29 +1,77 @@
1
- # Nx React Native Workspace Generator
1
+ # React Native Mobile App Starter with NX
2
2
 
3
- [![npm version](https://badge.fury.io/js/nx-react-native-cli.svg)](https://www.npmjs.com/package/nx-react-native-cli)
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
4
4
 
5
5
  ## 📦 Introduction
6
6
 
7
- This NPM library package allows you to effortlessly generate a Nx workspace with a React Native preset. It includes a carefully curated set of tools and libraries to streamline your development process.
7
+ A comprehensive React Native mobile application starter kit built with Nx workspace. This package provides a carefully curated set of tools and libraries to streamline your mobile app development process with React Native 0.78.0 and the New Architecture.
8
8
 
9
9
  ## 🚀 Features
10
10
 
11
- - **TypeScript**: Strongly typed JavaScript for better code quality.
12
- - **TailwindCSS via TWRNC**: Utility-first CSS framework for fast UI development.
13
- - **React Navigation**: Easy navigation solutions for your apps.
14
- - **React Native Reanimated**: Powerful animations for smooth user experiences.
15
- - **React Native SVG**: SVG support for your React Native projects.
16
- - **React Native Dotenv**: Load environment variables from a `.env` file.
17
- - **Zustand and Jotai**: State management libraries for simpler state handling.
18
- - **MMKV**: Efficient key-value storage for React Native.
19
- - **React Query**: Data fetching and state synchronization for server-state.
20
- - **Zod**: TypeScript-first schema declaration and validation library.
21
- - **React Hook Forms**: Performant, flexible, and extensible forms with easy-to-use validation.
22
- - **Fastlane Support**: Automate building and publishing your apps to Firebase App Distribution and TestFlight.
23
-
24
-
25
- <h2 id="🛠-usage">🛠 Usage</h2>
26
- <p>Generate a new Nx workspace with the React Native preset:</p>
27
- <pre><code class="language-bash">npx nx-react-native-cli@latest create
28
- </code></pre>
11
+ ### Core Technologies
12
+ - **Yarn**: Fast, reliable, and secure dependency management
13
+ - **React Native 0.78.0**: Latest version with New Architecture support
14
+ - **TypeScript**: Strongly typed JavaScript for better code quality
15
+ - **Nx Workspace**: Powerful monorepo tooling for scalable development
16
+ - **TailwindCSS via TWRNC**: Utility-first CSS framework for fast UI development
29
17
 
18
+ ### UI & Animation
19
+ - **React Native Reanimated**: Powerful animations for smooth user experiences
20
+ - **React Native Gesture Handler**: Fluid gesture-based interactions
21
+ - **React Native SVG**: SVG support for vector graphics
22
+ - **Lottie**: Beautiful animations with minimal effort
23
+ - **@shopify/react-native-skia**: High-performance 2D graphics
24
+ - **@gorhom/bottom-sheet**: Customizable bottom sheet component
25
+
26
+ ### Navigation
27
+ - **React Navigation v7**: Complete navigation solution with native stack, material top tabs, and stack navigators
28
+
29
+ ### State Management
30
+ - **Zustand**: Simple, fast state management
31
+ - **Jotai**: Primitive and flexible state management
32
+ - **React Query (TanStack Query)**: Data fetching and server state management
33
+ - **React Hook Form**: Performant, flexible form handling
34
+
35
+ ### Storage & Persistence
36
+ - **React Native MMKV**: High-performance key-value storage
37
+ - **TanStack Query Persistence**: Persist and rehydrate query cache
38
+
39
+ ### Data Validation
40
+ - **Zod**: TypeScript-first schema validation
41
+ - **@hookform/resolvers**: Connect Zod with React Hook Form
42
+
43
+ ### Developer Experience
44
+ - **ESLint & Prettier**: Code quality and formatting
45
+ - **Jest & Testing Library**: Comprehensive testing setup
46
+ - **Husky**: Git hooks for code quality
47
+ - **Fastlane**: Automated deployment for iOS and Android
48
+
49
+ ## 🚀 Getting Started
50
+
51
+ ### Running the Application
52
+
53
+ To get started with development, follow these simple commands:
54
+
55
+ ```bash
56
+ # Start the Metro bundler
57
+ npm run serve:mobile
58
+
59
+ # Build and run on Android
60
+ npm run android
61
+
62
+ # Open the iOS project in Xcode for building and running
63
+ npm run xcode
64
+ ```
65
+
66
+ These commands will help you:
67
+ - `serve:mobile`: Start the Metro bundler which compiles your JavaScript code
68
+ - `android`: Build and install the app on an Android device or emulator
69
+ - `xcode`: Open the iOS project in Xcode where you can build and run on iOS simulators or physical devices
70
+
71
+ ## 📄 License
72
+
73
+ MIT
74
+
75
+ ## 🙏 Acknowledgements
76
+
77
+ This project uses various open-source libraries and tools. We're grateful to the maintainers and contributors of these projects.