nx-react-native-cli 1.1.0 → 2.0.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 (57) hide show
  1. package/README.md +73 -19
  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,83 @@
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
+ [![npm version](https://img.shields.io/npm/v/nx-react-native-cli.svg?style=flat)](https://www.npmjs.com/package/nx-react-native-cli)
4
5
 
5
6
  ## 📦 Introduction
6
7
 
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.
8
-
9
- ## 🚀 Features
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
-
8
+ 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.
24
9
 
25
10
  <h2 id="🛠-usage">🛠 Usage</h2>
26
11
  <p>Generate a new Nx workspace with the React Native preset:</p>
27
12
  <pre><code class="language-bash">npx nx-react-native-cli@latest create
28
13
  </code></pre>
29
14
 
15
+ ## 🚀 Features
16
+
17
+ ### Core Technologies
18
+ - **Yarn**: Fast, reliable, and secure dependency management
19
+ - **React Native 0.78.0**: Latest version with New Architecture support
20
+ - **TypeScript**: Strongly typed JavaScript for better code quality
21
+ - **Nx Workspace**: Powerful monorepo tooling for scalable development
22
+ - **TailwindCSS via TWRNC**: Utility-first CSS framework for fast UI development
23
+
24
+ ### UI & Animation
25
+ - **React Native Reanimated**: Powerful animations for smooth user experiences
26
+ - **React Native Gesture Handler**: Fluid gesture-based interactions
27
+ - **React Native SVG**: SVG support for vector graphics
28
+ - **Lottie**: Beautiful animations with minimal effort
29
+ - **@shopify/react-native-skia**: High-performance 2D graphics
30
+ - **@gorhom/bottom-sheet**: Customizable bottom sheet component
31
+
32
+ ### Navigation
33
+ - **React Navigation v7**: Complete navigation solution with native stack, material top tabs, and stack navigators
34
+
35
+ ### State Management
36
+ - **Zustand**: Simple, fast state management
37
+ - **Jotai**: Primitive and flexible state management
38
+ - **React Query (TanStack Query)**: Data fetching and server state management
39
+ - **React Hook Form**: Performant, flexible form handling
40
+
41
+ ### Storage & Persistence
42
+ - **React Native MMKV**: High-performance key-value storage
43
+ - **TanStack Query Persistence**: Persist and rehydrate query cache
44
+
45
+ ### Data Validation
46
+ - **Zod**: TypeScript-first schema validation
47
+ - **@hookform/resolvers**: Connect Zod with React Hook Form
48
+
49
+ ### Developer Experience
50
+ - **ESLint & Prettier**: Code quality and formatting
51
+ - **Jest & Testing Library**: Comprehensive testing setup
52
+ - **Husky**: Git hooks for code quality
53
+ - **Fastlane**: Automated deployment for iOS and Android
54
+
55
+ ## 🚀 Getting Started
56
+
57
+ ### Running the Application
58
+
59
+ To get started with development, follow these simple commands:
60
+
61
+ ```bash
62
+ # Start the Metro bundler
63
+ npm run serve:mobile
64
+
65
+ # Build and run on Android
66
+ npm run android
67
+
68
+ # Open the iOS project in Xcode for building and running
69
+ npm run xcode
70
+ ```
71
+
72
+ These commands will help you:
73
+ - `serve:mobile`: Start the Metro bundler which compiles your JavaScript code
74
+ - `android`: Build and install the app on an Android device or emulator
75
+ - `xcode`: Open the iOS project in Xcode where you can build and run on iOS simulators or physical devices
76
+
77
+ ## 📄 License
78
+
79
+ MIT
80
+
81
+ ## 🙏 Acknowledgements
82
+
83
+ This project uses various open-source libraries and tools. We're grateful to the maintainers and contributors of these projects.