nx-react-native-cli 2.3.1 → 2.5.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 (173) hide show
  1. package/README.md +61 -6
  2. package/lib/index.cjs +60 -53
  3. package/package.json +4 -3
  4. package/templates/19.7.0/apps/mobile/.ignorefile +147 -0
  5. package/templates/21.2.2/.eslintrc.json +288 -0
  6. package/templates/21.2.2/.prettierignore +9 -0
  7. package/templates/21.2.2/.prettierrc +13 -0
  8. package/templates/21.2.2/.ruby-version +1 -0
  9. package/templates/21.2.2/apps/mobile/.eslintrc.json +38 -0
  10. package/templates/21.2.2/apps/mobile/.ignorefile +147 -0
  11. package/templates/21.2.2/apps/mobile/Gemfile +20 -0
  12. package/templates/21.2.2/apps/mobile/android/app/build.gradle +159 -0
  13. package/templates/21.2.2/apps/mobile/android/app/src/dev/res/values/strings.xml +3 -0
  14. package/templates/21.2.2/apps/mobile/android/app/src/main/java/com/mobile/MainActivity.kt +28 -0
  15. package/templates/21.2.2/apps/mobile/android/app/src/main/java/com/mobile/MainApplication.kt +44 -0
  16. package/templates/21.2.2/apps/mobile/android/app/src/production/res/values/strings.xml +3 -0
  17. package/templates/21.2.2/apps/mobile/android/settings.gradle +6 -0
  18. package/templates/21.2.2/apps/mobile/ios/Mobile/AppDelegate.mm +53 -0
  19. package/templates/21.2.2/apps/mobile/jest.config.ts +12 -0
  20. package/templates/21.2.2/apps/mobile/metro.config.js +42 -0
  21. package/templates/21.2.2/apps/mobile/project.json +107 -0
  22. package/templates/21.2.2/apps/mobile/src/main.tsx +5 -0
  23. package/templates/21.2.2/apps/mobile/test-setup.ts +1 -0
  24. package/templates/21.2.2/apps/mobile/tsconfig.app.json +34 -0
  25. package/templates/shared/apps/mobile/.env.template +3 -0
  26. /package/templates/{.eslintrc.json → 19.7.0/.eslintrc.json} +0 -0
  27. /package/templates/{.prettierignore → 19.7.0/.prettierignore} +0 -0
  28. /package/templates/{.prettierrc → 19.7.0/.prettierrc} +0 -0
  29. /package/templates/{.ruby-version → 19.7.0/.ruby-version} +0 -0
  30. /package/templates/{apps → 19.7.0/apps}/mobile/.eslintrc.json +0 -0
  31. /package/templates/{apps → 19.7.0/apps}/mobile/Gemfile +0 -0
  32. /package/templates/{apps → 19.7.0/apps}/mobile/android/app/build.gradle +0 -0
  33. /package/templates/{apps → 19.7.0/apps}/mobile/android/app/src/dev/res/values/strings.xml +0 -0
  34. /package/templates/{apps → 19.7.0/apps}/mobile/android/app/src/main/java/com/appsmobile/MainActivity.kt +0 -0
  35. /package/templates/{apps → 19.7.0/apps}/mobile/android/app/src/main/java/com/appsmobile/MainApplication.kt +0 -0
  36. /package/templates/{apps → 19.7.0/apps}/mobile/android/app/src/production/res/values/strings.xml +0 -0
  37. /package/templates/{apps → 19.7.0/apps}/mobile/android/settings.gradle +0 -0
  38. /package/templates/{apps → 19.7.0/apps}/mobile/ios/AppsMobile/AppDelegate.mm +0 -0
  39. /package/templates/{apps → 19.7.0/apps}/mobile/jest.config.ts +0 -0
  40. /package/templates/{apps → 19.7.0/apps}/mobile/metro.config.js +0 -0
  41. /package/templates/{apps → 19.7.0/apps}/mobile/project.json +0 -0
  42. /package/templates/{apps → 19.7.0/apps}/mobile/src/main.tsx +0 -0
  43. /package/templates/{apps → 19.7.0/apps}/mobile/test-setup.ts +0 -0
  44. /package/templates/{apps → 19.7.0/apps}/mobile/tsconfig.app.json +0 -0
  45. /package/templates/{apps → 19.7.0/apps}/mobile/tsconfig.spec.json +0 -0
  46. /package/templates/{.husky → shared/.husky}/pre-commit +0 -0
  47. /package/templates/{.husky → shared/.husky}/pre-push +0 -0
  48. /package/templates/{.ignorefile → shared/.ignorefile} +0 -0
  49. /package/templates/{.nvmrc → shared/.nvmrc} +0 -0
  50. /package/templates/{.vscode → shared/.vscode}/extensions.json +0 -0
  51. /package/templates/{.vscode → shared/.vscode}/settings.json +0 -0
  52. /package/templates/{apps/mobile/.env.template → shared/apps/mobile/.env} +0 -0
  53. /package/templates/{apps → shared/apps}/mobile/android/app/proguard-rules.pro +0 -0
  54. /package/templates/{apps → shared/apps}/mobile/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -0
  55. /package/templates/{apps → shared/apps}/mobile/android/build.gradle +0 -0
  56. /package/templates/{apps → shared/apps}/mobile/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  57. /package/templates/{apps → shared/apps}/mobile/android/gradle/wrapper/gradle-wrapper.properties +0 -0
  58. /package/templates/{apps → shared/apps}/mobile/android/gradle.properties +0 -0
  59. /package/templates/{apps → shared/apps}/mobile/android/gradlew +0 -0
  60. /package/templates/{apps → shared/apps}/mobile/android/gradlew.bat +0 -0
  61. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterBlack.ttf +0 -0
  62. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterBlackItalic.ttf +0 -0
  63. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterBold.ttf +0 -0
  64. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterBoldItalic.ttf +0 -0
  65. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterExtraBold.ttf +0 -0
  66. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterExtraBoldItalic.ttf +0 -0
  67. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterExtraLight.ttf +0 -0
  68. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterExtraLightItalic.ttf +0 -0
  69. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterItalic.ttf +0 -0
  70. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterLight.ttf +0 -0
  71. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterLightItalic.ttf +0 -0
  72. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterMedium.ttf +0 -0
  73. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterMediumItalic.ttf +0 -0
  74. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterRegular.ttf +0 -0
  75. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterSemiBold.ttf +0 -0
  76. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterSemiBoldItalic.ttf +0 -0
  77. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterThin.ttf +0 -0
  78. /package/templates/{apps → shared/apps}/mobile/assets/fonts/InterThinItalic.ttf +0 -0
  79. /package/templates/{apps → shared/apps}/mobile/babel.config.json +0 -0
  80. /package/templates/{apps → shared/apps}/mobile/export-node-binary.sh +0 -0
  81. /package/templates/{apps → shared/apps}/mobile/fastlane/.env.template +0 -0
  82. /package/templates/{apps → shared/apps}/mobile/fastlane/Fastfile +0 -0
  83. /package/templates/{apps → shared/apps}/mobile/fastlane/Matchfile +0 -0
  84. /package/templates/{apps → shared/apps}/mobile/fastlane/Pluginfile +0 -0
  85. /package/templates/{apps → shared/apps}/mobile/fastlane/README.md +0 -0
  86. /package/templates/{apps → shared/apps}/mobile/package.json +0 -0
  87. /package/templates/{apps → shared/apps}/mobile/react-native.config.js +0 -0
  88. /package/templates/{apps → shared/apps}/mobile/src/app/index.tsx +0 -0
  89. /package/templates/{apps → shared/apps}/mobile/src/assets/images/.gitkeep +0 -0
  90. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/BottomSheet/bottom-sheet.component.tsx +0 -0
  91. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/BottomSheet/index.ts +0 -0
  92. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/Button/button.component.tsx +0 -0
  93. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/Button/index.ts +0 -0
  94. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/Divider/divider-component.tsx +0 -0
  95. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/Divider/index.ts +0 -0
  96. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/ExcludedEdges/excluded-edges.component.tsx +0 -0
  97. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/ExcludedEdges/index.ts +0 -0
  98. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/InputLayout/index.ts +0 -0
  99. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/InputLayout/input-layout.component.tsx +0 -0
  100. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/KeyboardAccessory/index.ts +0 -0
  101. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/KeyboardAccessory/keyboard-accessory.component.tsx +0 -0
  102. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/KeyboardAwareScrollView/index.ts +0 -0
  103. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/KeyboardAwareScrollView/keyboard-aware-scroll-view.component.tsx +0 -0
  104. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/ListLoadingItem/index.ts +0 -0
  105. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/ListLoadingItem/list-loading-item.component.tsx +0 -0
  106. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/Modal/index.ts +0 -0
  107. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/Modal/modal.component.tsx +0 -0
  108. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/ScreenLoader/index.ts +0 -0
  109. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/ScreenLoader/screen-loader.component.tsx +0 -0
  110. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/Skeleton/index.ts +0 -0
  111. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/Skeleton/skeleton.component.tsx +0 -0
  112. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/TextInput/bottom-sheet-text-input.component.tsx +0 -0
  113. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/TextInput/constants.ts +0 -0
  114. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/TextInput/index.ts +0 -0
  115. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/TextInput/text-input-area.component.tsx +0 -0
  116. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/TextInput/text-input.component.tsx +0 -0
  117. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/TextInput/util.ts +0 -0
  118. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/Typography/index.ts +0 -0
  119. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/Typography/typography.component.tsx +0 -0
  120. /package/templates/{apps → shared/apps}/mobile/src/components/atoms/index.ts +0 -0
  121. /package/templates/{apps → shared/apps}/mobile/src/components/index.ts +0 -0
  122. /package/templates/{apps → shared/apps}/mobile/src/components/molecules/BackButton/back-button.component.tsx +0 -0
  123. /package/templates/{apps → shared/apps}/mobile/src/components/molecules/BackButton/index.ts +0 -0
  124. /package/templates/{apps → shared/apps}/mobile/src/components/molecules/BottomActionsContainer/BottomActionsContainer.component.tsx +0 -0
  125. /package/templates/{apps → shared/apps}/mobile/src/components/molecules/BottomActionsContainer/index.ts +0 -0
  126. /package/templates/{apps → shared/apps}/mobile/src/components/molecules/ScreenContainer/index.ts +0 -0
  127. /package/templates/{apps → shared/apps}/mobile/src/components/molecules/ScreenContainer/screen-container.component.tsx +0 -0
  128. /package/templates/{apps → shared/apps}/mobile/src/components/molecules/ScreenHeader/index.ts +0 -0
  129. /package/templates/{apps → shared/apps}/mobile/src/components/molecules/ScreenHeader/screen-header.component.tsx +0 -0
  130. /package/templates/{apps → shared/apps}/mobile/src/components/molecules/StorageManager/StorageManager.component.tsx +0 -0
  131. /package/templates/{apps → shared/apps}/mobile/src/components/molecules/StorageManager/index.ts +0 -0
  132. /package/templates/{apps → shared/apps}/mobile/src/components/molecules/index.ts +0 -0
  133. /package/templates/{apps → shared/apps}/mobile/src/components/organisms/index.ts +0 -0
  134. /package/templates/{apps → shared/apps}/mobile/src/config/index.ts +0 -0
  135. /package/templates/{apps → shared/apps}/mobile/src/dimens/index.ts +0 -0
  136. /package/templates/{apps → shared/apps}/mobile/src/env.d.ts +0 -0
  137. /package/templates/{apps → shared/apps}/mobile/src/hooks/index.ts +0 -0
  138. /package/templates/{apps → shared/apps}/mobile/src/hooks/useAppState.hook.tsx +0 -0
  139. /package/templates/{apps → shared/apps}/mobile/src/hooks/useApplicationDimensions.hook.tsx +0 -0
  140. /package/templates/{apps → shared/apps}/mobile/src/hooks/useDebounce.hook.ts +0 -0
  141. /package/templates/{apps → shared/apps}/mobile/src/hooks/useGetLayoutHeight.hook.tsx +0 -0
  142. /package/templates/{apps → shared/apps}/mobile/src/hooks/useGetLayoutWidth.hook.tsx +0 -0
  143. /package/templates/{apps → shared/apps}/mobile/src/hooks/useNavigation.hook.tsx +0 -0
  144. /package/templates/{apps → shared/apps}/mobile/src/hooks/useShakeAnimation.hook.tsx +0 -0
  145. /package/templates/{apps → shared/apps}/mobile/src/hooks/useTextInputChangeFocus.hook.tsx +0 -0
  146. /package/templates/{apps → shared/apps}/mobile/src/hooks/useThrottle.hook.ts +0 -0
  147. /package/templates/{apps → shared/apps}/mobile/src/hooks/useToggleDarkMode.hook.tsx +0 -0
  148. /package/templates/{apps → shared/apps}/mobile/src/icons/arrow-left.svg +0 -0
  149. /package/templates/{apps → shared/apps}/mobile/src/icons/cross.svg +0 -0
  150. /package/templates/{apps → shared/apps}/mobile/src/icons/gear.svg +0 -0
  151. /package/templates/{apps → shared/apps}/mobile/src/icons/index.ts +0 -0
  152. /package/templates/{apps → shared/apps}/mobile/src/icons/keyboard-hide.svg +0 -0
  153. /package/templates/{apps → shared/apps}/mobile/src/routes/index.tsx +0 -0
  154. /package/templates/{apps → shared/apps}/mobile/src/routes/privateRoutes.tsx +0 -0
  155. /package/templates/{apps → shared/apps}/mobile/src/routes/publicRoutes.tsx +0 -0
  156. /package/templates/{apps → shared/apps}/mobile/src/routes/routes.enum.ts +0 -0
  157. /package/templates/{apps → shared/apps}/mobile/src/routes/screen-options.ts +0 -0
  158. /package/templates/{apps → shared/apps}/mobile/src/routes/screens.enum.ts +0 -0
  159. /package/templates/{apps → shared/apps}/mobile/src/screens/HomeScreen/home.screen.tsx +0 -0
  160. /package/templates/{apps → shared/apps}/mobile/src/screens/LandingScreen/landing.screen.tsx +0 -0
  161. /package/templates/{apps → shared/apps}/mobile/src/stores/index.ts +0 -0
  162. /package/templates/{apps → shared/apps}/mobile/src/stores/local-storage.store.ts +0 -0
  163. /package/templates/{apps → shared/apps}/mobile/src/stores/mmkvStorage.ts +0 -0
  164. /package/templates/{apps → shared/apps}/mobile/src/tailwind/index.ts +0 -0
  165. /package/templates/{apps → shared/apps}/mobile/src/types/component.type.ts +0 -0
  166. /package/templates/{apps → shared/apps}/mobile/src/types/index.ts +0 -0
  167. /package/templates/{apps → shared/apps}/mobile/src/utils/axios.util.ts +0 -0
  168. /package/templates/{apps → shared/apps}/mobile/src/utils/index.ts +0 -0
  169. /package/templates/{apps → shared/apps}/mobile/src/utils/log.util.ts +0 -0
  170. /package/templates/{apps → shared/apps}/mobile/src/utils/route.util.ts +0 -0
  171. /package/templates/{apps → shared/apps}/mobile/tailwind.config.js +0 -0
  172. /package/templates/{check-env.sh → shared/check-env.sh} +0 -0
  173. /package/templates/{clean-generated-outputs.sh → shared/clean-generated-outputs.sh} +0 -0
package/README.md CHANGED
@@ -5,18 +5,73 @@
5
5
 
6
6
  ## 📦 Introduction
7
7
 
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.83.0 and the New Architecture.
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.83.1 and the New Architecture.
9
9
 
10
- <h2 id="🛠-usage">🛠 Usage</h2>
11
- <p>Generate a new Nx workspace with the React Native preset:</p>
12
- <pre><code class="language-bash">npx nx-react-native-cli@latest create
13
- </code></pre>
10
+ ## 🛠 Usage
11
+
12
+ ### Create Command
13
+
14
+ Create a new Nx workspace with React Native:
15
+
16
+ **Interactive mode** (omit parameters to get prompts):
17
+ ```bash
18
+ npx nx-react-native-cli@latest create
19
+ ```
20
+
21
+ OR
22
+
23
+ ```bash
24
+ npx nx-react-native-cli@latest create [workspace_name] [bundle_id]
25
+ ```
26
+
27
+ **Options:**
28
+ - `--fresh` - Create without copying template files
29
+ - `--nx-version <version>` - Specify Nx version (default: 21.2.2)
30
+ - `--skip-install` - Skip yarn install
31
+ - `--skip-configs` - Skip prettier, eslint, and husky configs
32
+
33
+ **Examples:**
34
+ ```bash
35
+ npx nx-react-native-cli@latest create MyApp com.company.myapp
36
+ npx nx-react-native-cli@latest create MyApp com.company.myapp --skip-configs
37
+ ```
38
+
39
+ ### Add Command
40
+
41
+ Add React Native to an existing Nx workspace:
42
+
43
+ **Interactive mode** (omit parameters to get prompts):
44
+ ```bash
45
+ cd my-existing-workspace
46
+ npx nx-react-native-cli@latest add
47
+ ```
48
+
49
+ OR
50
+
51
+ ```bash
52
+ npx nx-react-native-cli@latest add [app_name] [bundle_id]
53
+ ```
54
+
55
+
56
+ **Options:**
57
+ - `--fresh` - Add without copying template files
58
+ - `--skip-install` - Skip yarn install
59
+ - `--skip-configs` - Skip prettier, eslint, and husky configs
60
+
61
+ **Note:** Automatically detects NX version from workspace package.json
62
+
63
+ **Examples:**
64
+ ```bash
65
+ cd my-existing-workspace
66
+ npx nx-react-native-cli@latest add MyApp com.company.myapp
67
+ npx nx-react-native-cli@latest add MyApp com.company.myapp --skip-configs
68
+ ```
14
69
 
15
70
  ## 🚀 Features
16
71
 
17
72
  ### Core Technologies
18
73
  - **Yarn**: Fast, reliable, and secure dependency management
19
- - **React Native 0.83.0**: Latest version with New Architecture support
74
+ - **React Native 0.83.1**: Latest version with New Architecture support
20
75
  - **TypeScript**: Strongly typed JavaScript for better code quality
21
76
  - **Nx Workspace**: Powerful monorepo tooling for scalable development
22
77
  - **TailwindCSS via TWRNC**: Utility-first CSS framework for fast UI development