@nx/react-native 16.0.0-beta.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 (368) hide show
  1. package/.eslintrc.json +19 -0
  2. package/CHANGELOG.md +8 -0
  3. package/LICENSE +22 -0
  4. package/README.md +63 -0
  5. package/executors.json +106 -0
  6. package/generators.json +109 -0
  7. package/index.d.ts +5 -0
  8. package/index.js +14 -0
  9. package/index.js.map +1 -0
  10. package/migrations.json +1291 -0
  11. package/package.json +58 -0
  12. package/plugins/jest/svg-mock.d.ts +0 -0
  13. package/plugins/jest/svg-mock.js +4 -0
  14. package/plugins/jest/svg-mock.js.map +1 -0
  15. package/plugins/metro-resolver.d.ts +1 -0
  16. package/plugins/metro-resolver.js +135 -0
  17. package/plugins/metro-resolver.js.map +1 -0
  18. package/plugins/with-nx-metro.d.ts +8 -0
  19. package/plugins/with-nx-metro.js +32 -0
  20. package/plugins/with-nx-metro.js.map +1 -0
  21. package/project.json +64 -0
  22. package/src/executors/build-android/build-android.impl.d.ts +6 -0
  23. package/src/executors/build-android/build-android.impl.js +76 -0
  24. package/src/executors/build-android/build-android.impl.js.map +1 -0
  25. package/src/executors/build-android/build-android.impl.ts +108 -0
  26. package/src/executors/build-android/compat.d.ts +2 -0
  27. package/src/executors/build-android/compat.js +6 -0
  28. package/src/executors/build-android/compat.js.map +1 -0
  29. package/src/executors/build-android/schema.d.ts +31 -0
  30. package/src/executors/build-android/schema.json +102 -0
  31. package/src/executors/build-ios/build-ios.impl.d.ts +6 -0
  32. package/src/executors/build-ios/build-ios.impl.js +77 -0
  33. package/src/executors/build-ios/build-ios.impl.js.map +1 -0
  34. package/src/executors/build-ios/build-ios.impl.ts +118 -0
  35. package/src/executors/build-ios/compat.d.ts +2 -0
  36. package/src/executors/build-ios/compat.js +6 -0
  37. package/src/executors/build-ios/compat.js.map +1 -0
  38. package/src/executors/build-ios/schema.d.ts +22 -0
  39. package/src/executors/build-ios/schema.json +106 -0
  40. package/src/executors/bundle/bundle.impl.d.ts +6 -0
  41. package/src/executors/bundle/bundle.impl.js +58 -0
  42. package/src/executors/bundle/bundle.impl.js.map +1 -0
  43. package/src/executors/bundle/bundle.impl.ts +76 -0
  44. package/src/executors/bundle/compat.d.ts +2 -0
  45. package/src/executors/bundle/compat.js +6 -0
  46. package/src/executors/bundle/compat.js.map +1 -0
  47. package/src/executors/bundle/schema.d.ts +16 -0
  48. package/src/executors/bundle/schema.json +92 -0
  49. package/src/executors/ensure-symlink/compat.d.ts +2 -0
  50. package/src/executors/ensure-symlink/compat.js +6 -0
  51. package/src/executors/ensure-symlink/compat.js.map +1 -0
  52. package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +5 -0
  53. package/src/executors/ensure-symlink/ensure-symlink.impl.js +13 -0
  54. package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +1 -0
  55. package/src/executors/ensure-symlink/ensure-symlink.impl.ts +18 -0
  56. package/src/executors/ensure-symlink/schema.json +11 -0
  57. package/src/executors/pod-install/compat.d.ts +2 -0
  58. package/src/executors/pod-install/compat.js +6 -0
  59. package/src/executors/pod-install/compat.js.map +1 -0
  60. package/src/executors/pod-install/pod-install.impl.d.ts +6 -0
  61. package/src/executors/pod-install/pod-install.impl.js +15 -0
  62. package/src/executors/pod-install/pod-install.impl.js.map +1 -0
  63. package/src/executors/pod-install/pod-install.impl.ts +21 -0
  64. package/src/executors/pod-install/schema.d.ts +3 -0
  65. package/src/executors/pod-install/schema.json +18 -0
  66. package/src/executors/run-android/compat.d.ts +2 -0
  67. package/src/executors/run-android/compat.js +6 -0
  68. package/src/executors/run-android/compat.js.map +1 -0
  69. package/src/executors/run-android/run-android.impl.d.ts +6 -0
  70. package/src/executors/run-android/run-android.impl.js +72 -0
  71. package/src/executors/run-android/run-android.impl.js.map +1 -0
  72. package/src/executors/run-android/run-android.impl.ts +110 -0
  73. package/src/executors/run-android/schema.d.ts +24 -0
  74. package/src/executors/run-android/schema.json +121 -0
  75. package/src/executors/run-ios/compat.d.ts +2 -0
  76. package/src/executors/run-ios/compat.js +6 -0
  77. package/src/executors/run-ios/compat.js.map +1 -0
  78. package/src/executors/run-ios/run-ios.impl.d.ts +6 -0
  79. package/src/executors/run-ios/run-ios.impl.js +78 -0
  80. package/src/executors/run-ios/run-ios.impl.js.map +1 -0
  81. package/src/executors/run-ios/run-ios.impl.ts +120 -0
  82. package/src/executors/run-ios/schema.d.ts +12 -0
  83. package/src/executors/run-ios/schema.json +119 -0
  84. package/src/executors/start/compat.d.ts +2 -0
  85. package/src/executors/start/compat.js +6 -0
  86. package/src/executors/start/compat.js.map +1 -0
  87. package/src/executors/start/lib/is-packager-running.d.ts +1 -0
  88. package/src/executors/start/lib/is-packager-running.js +19 -0
  89. package/src/executors/start/lib/is-packager-running.js.map +1 -0
  90. package/src/executors/start/schema.d.ts +7 -0
  91. package/src/executors/start/schema.json +28 -0
  92. package/src/executors/start/start.impl.d.ts +8 -0
  93. package/src/executors/start/start.impl.js +99 -0
  94. package/src/executors/start/start.impl.js.map +1 -0
  95. package/src/executors/start/start.impl.ts +120 -0
  96. package/src/executors/storybook/compat.d.ts +2 -0
  97. package/src/executors/storybook/compat.js +6 -0
  98. package/src/executors/storybook/compat.js.map +1 -0
  99. package/src/executors/storybook/schema.d.ts +7 -0
  100. package/src/executors/storybook/schema.json +34 -0
  101. package/src/executors/storybook/storybook.impl.d.ts +5 -0
  102. package/src/executors/storybook/storybook.impl.js +76 -0
  103. package/src/executors/storybook/storybook.impl.js.map +1 -0
  104. package/src/executors/storybook/storybook.impl.ts +105 -0
  105. package/src/executors/sync-deps/compat.d.ts +2 -0
  106. package/src/executors/sync-deps/compat.js +6 -0
  107. package/src/executors/sync-deps/compat.js.map +1 -0
  108. package/src/executors/sync-deps/schema.d.ts +4 -0
  109. package/src/executors/sync-deps/schema.json +28 -0
  110. package/src/executors/sync-deps/sync-deps.impl.d.ts +8 -0
  111. package/src/executors/sync-deps/sync-deps.impl.js +62 -0
  112. package/src/executors/sync-deps/sync-deps.impl.js.map +1 -0
  113. package/src/executors/sync-deps/sync-deps.impl.ts +101 -0
  114. package/src/generators/application/application.d.ts +5 -0
  115. package/src/generators/application/application.js +40 -0
  116. package/src/generators/application/application.js.map +1 -0
  117. package/src/generators/application/application.spec.ts +214 -0
  118. package/src/generators/application/files/app/.ruby-version +1 -0
  119. package/src/generators/application/files/app/Gemfile.template +6 -0
  120. package/src/generators/application/files/app/android/app/build.gradle.template +184 -0
  121. package/src/generators/application/files/app/android/app/debug.keystore +0 -0
  122. package/src/generators/application/files/app/android/app/proguard-rules.pro +10 -0
  123. package/src/generators/application/files/app/android/app/src/androidTest/java/com/__lowerCaseName__/DetoxTest.java.template +30 -0
  124. package/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template +14 -0
  125. package/src/generators/application/files/app/android/app/src/debug/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +75 -0
  126. package/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +26 -0
  127. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template +35 -0
  128. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainApplication.java.template +63 -0
  129. package/src/generators/application/files/app/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
  130. package/src/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  131. package/src/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  132. package/src/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  133. package/src/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  134. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  135. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  136. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  137. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  138. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  139. package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  140. package/src/generators/application/files/app/android/app/src/main/res/values/strings.xml.template +3 -0
  141. package/src/generators/application/files/app/android/app/src/main/res/values/styles.xml +9 -0
  142. package/src/generators/application/files/app/android/app/src/main/res/xml/network_security_config.xml +7 -0
  143. package/src/generators/application/files/app/android/app/src/release/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +20 -0
  144. package/src/generators/application/files/app/android/build.gradle.template +34 -0
  145. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  146. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  147. package/src/generators/application/files/app/android/gradle.properties +44 -0
  148. package/src/generators/application/files/app/android/gradlew.bat +89 -0
  149. package/src/generators/application/files/app/android/gradlew.template +234 -0
  150. package/src/generators/application/files/app/android/settings.gradle.template +7 -0
  151. package/src/generators/application/files/app/app.json.template +4 -0
  152. package/src/generators/application/files/app/babel.config.json.template +3 -0
  153. package/src/generators/application/files/app/ios/.xcode.env.template +12 -0
  154. package/src/generators/application/files/app/ios/Podfile.template +60 -0
  155. package/src/generators/application/files/app/ios/__className__/AppDelegate.h +6 -0
  156. package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +36 -0
  157. package/src/generators/application/files/app/ios/__className__/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  158. package/src/generators/application/files/app/ios/__className__/Images.xcassets/Contents.json +6 -0
  159. package/src/generators/application/files/app/ios/__className__/Info.plist.template +55 -0
  160. package/src/generators/application/files/app/ios/__className__/LaunchScreen.storyboard.template +47 -0
  161. package/src/generators/application/files/app/ios/__className__/main.m +10 -0
  162. package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +702 -0
  163. package/src/generators/application/files/app/ios/__className__.xcodeproj/xcshareddata/xcschemes/__className__.xcscheme.template +88 -0
  164. package/src/generators/application/files/app/ios/__className__.xcworkspace/contents.xcworkspacedata +10 -0
  165. package/src/generators/application/files/app/ios/__className__Tests/Info.plist +24 -0
  166. package/src/generators/application/files/app/ios/__className__Tests/__className__Tests.m +66 -0
  167. package/src/generators/application/files/app/metro.config.js.template +38 -0
  168. package/src/generators/application/files/app/package.json.template +15 -0
  169. package/src/generators/application/files/app/src/app/App.spec.tsx.template +9 -0
  170. package/src/generators/application/files/app/src/app/App.tsx.template +694 -0
  171. package/src/generators/application/files/app/src/main.tsx.template +4 -0
  172. package/src/generators/application/files/app/test-setup.ts.template +1 -0
  173. package/src/generators/application/files/app/tsconfig.app.json.template +9 -0
  174. package/src/generators/application/files/app/tsconfig.json.template +25 -0
  175. package/src/generators/application/lib/add-detox.d.ts +3 -0
  176. package/src/generators/application/lib/add-detox.js +16 -0
  177. package/src/generators/application/lib/add-detox.js.map +1 -0
  178. package/src/generators/application/lib/add-project.d.ts +3 -0
  179. package/src/generators/application/lib/add-project.js +83 -0
  180. package/src/generators/application/lib/add-project.js.map +1 -0
  181. package/src/generators/application/lib/create-application-files.d.ts +3 -0
  182. package/src/generators/application/lib/create-application-files.js +20 -0
  183. package/src/generators/application/lib/create-application-files.js.map +1 -0
  184. package/src/generators/application/lib/nomalize-options.spec.ts +138 -0
  185. package/src/generators/application/lib/normalize-options.d.ts +13 -0
  186. package/src/generators/application/lib/normalize-options.js +36 -0
  187. package/src/generators/application/lib/normalize-options.js.map +1 -0
  188. package/src/generators/application/schema.d.ts +19 -0
  189. package/src/generators/application/schema.json +89 -0
  190. package/src/generators/component/component.d.ts +5 -0
  191. package/src/generators/component/component.js +53 -0
  192. package/src/generators/component/component.js.map +1 -0
  193. package/src/generators/component/component.spec.ts +135 -0
  194. package/src/generators/component/files/__fileName__.spec.tsx__tmpl__ +11 -0
  195. package/src/generators/component/files/__fileName__.tsx__tmpl__ +32 -0
  196. package/src/generators/component/lib/add-import.d.ts +3 -0
  197. package/src/generators/component/lib/add-import.js +34 -0
  198. package/src/generators/component/lib/add-import.js.map +1 -0
  199. package/src/generators/component/lib/normalize-options.d.ts +8 -0
  200. package/src/generators/component/lib/normalize-options.js +58 -0
  201. package/src/generators/component/lib/normalize-options.js.map +1 -0
  202. package/src/generators/component/schema.d.ts +14 -0
  203. package/src/generators/component/schema.json +78 -0
  204. package/src/generators/component-story/component-story.d.ts +8 -0
  205. package/src/generators/component-story/component-story.js +113 -0
  206. package/src/generators/component-story/component-story.js.map +1 -0
  207. package/src/generators/component-story/component-story.spec.ts +433 -0
  208. package/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ +24 -0
  209. package/src/generators/component-story/schema.d.ts +5 -0
  210. package/src/generators/component-story/schema.json +34 -0
  211. package/src/generators/init/init.d.ts +6 -0
  212. package/src/generators/init/init.js +58 -0
  213. package/src/generators/init/init.js.map +1 -0
  214. package/src/generators/init/init.spec.ts +81 -0
  215. package/src/generators/init/lib/add-git-ignore-entry.d.ts +2 -0
  216. package/src/generators/init/lib/add-git-ignore-entry.js +25 -0
  217. package/src/generators/init/lib/add-git-ignore-entry.js.map +1 -0
  218. package/src/generators/init/lib/gitignore-entries.d.ts +1 -0
  219. package/src/generators/init/lib/gitignore-entries.js +75 -0
  220. package/src/generators/init/lib/gitignore-entries.js.map +1 -0
  221. package/src/generators/init/schema.d.ts +7 -0
  222. package/src/generators/init/schema.json +40 -0
  223. package/src/generators/library/files/lib/README.md +7 -0
  224. package/src/generators/library/files/lib/babel.config.json.template +17 -0
  225. package/src/generators/library/files/lib/package.json__tmpl__ +4 -0
  226. package/src/generators/library/files/lib/src/index.ts__tmpl__ +0 -0
  227. package/src/generators/library/files/lib/test-setup.ts.template +1 -0
  228. package/src/generators/library/files/lib/tsconfig.json__tmpl__ +16 -0
  229. package/src/generators/library/files/lib/tsconfig.lib.json__tmpl__ +9 -0
  230. package/src/generators/library/lib/normalize-options.d.ts +13 -0
  231. package/src/generators/library/lib/normalize-options.js +26 -0
  232. package/src/generators/library/lib/normalize-options.js.map +1 -0
  233. package/src/generators/library/library.d.ts +5 -0
  234. package/src/generators/library/library.js +103 -0
  235. package/src/generators/library/library.js.map +1 -0
  236. package/src/generators/library/library.spec.ts +397 -0
  237. package/src/generators/library/schema.d.ts +22 -0
  238. package/src/generators/library/schema.json +102 -0
  239. package/src/generators/stories/schema.d.ts +5 -0
  240. package/src/generators/stories/schema.json +42 -0
  241. package/src/generators/stories/stories-app.spec.ts +145 -0
  242. package/src/generators/stories/stories-lib.spec.ts +113 -0
  243. package/src/generators/stories/stories.d.ts +6 -0
  244. package/src/generators/stories/stories.js +63 -0
  245. package/src/generators/stories/stories.js.map +1 -0
  246. package/src/generators/storybook-configuration/configuration.d.ts +5 -0
  247. package/src/generators/storybook-configuration/configuration.js +60 -0
  248. package/src/generators/storybook-configuration/configuration.js.map +1 -0
  249. package/src/generators/storybook-configuration/configuration.spec.ts +146 -0
  250. package/src/generators/storybook-configuration/files/app/storybook.ts.template +9 -0
  251. package/src/generators/storybook-configuration/files/app/toggle-storybook.tsx.template +114 -0
  252. package/src/generators/storybook-configuration/files/root/story-loader.js.template +13 -0
  253. package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.d.ts +6 -0
  254. package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.js +26 -0
  255. package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.js.map +1 -0
  256. package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.spec.ts +161 -0
  257. package/src/generators/storybook-configuration/lib/create-storybook-files.d.ts +6 -0
  258. package/src/generators/storybook-configuration/lib/create-storybook-files.js +45 -0
  259. package/src/generators/storybook-configuration/lib/create-storybook-files.js.map +1 -0
  260. package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.d.ts +7 -0
  261. package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.js +30 -0
  262. package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.js.map +1 -0
  263. package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.spec.ts +65 -0
  264. package/src/generators/storybook-configuration/schema.d.ts +11 -0
  265. package/src/generators/storybook-configuration/schema.json +66 -0
  266. package/src/generators/upgrade-native/lib/create-native-files.d.ts +3 -0
  267. package/src/generators/upgrade-native/lib/create-native-files.js +15 -0
  268. package/src/generators/upgrade-native/lib/create-native-files.js.map +1 -0
  269. package/src/generators/upgrade-native/lib/normalize-options.d.ts +12 -0
  270. package/src/generators/upgrade-native/lib/normalize-options.js +28 -0
  271. package/src/generators/upgrade-native/lib/normalize-options.js.map +1 -0
  272. package/src/generators/upgrade-native/schema.d.ts +9 -0
  273. package/src/generators/upgrade-native/schema.json +41 -0
  274. package/src/generators/upgrade-native/upgrade-native.d.ts +9 -0
  275. package/src/generators/upgrade-native/upgrade-native.js +33 -0
  276. package/src/generators/upgrade-native/upgrade-native.js.map +1 -0
  277. package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.d.ts +8 -0
  278. package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.js +63 -0
  279. package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.js.map +1 -0
  280. package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.spec.ts +79 -0
  281. package/src/migrations/update-12-5-0/update-jest-for-react-native.d.ts +2 -0
  282. package/src/migrations/update-12-5-0/update-jest-for-react-native.js +62 -0
  283. package/src/migrations/update-12-5-0/update-jest-for-react-native.js.map +1 -0
  284. package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.d.ts +2 -0
  285. package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js +22 -0
  286. package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js.map +1 -0
  287. package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.spec.ts +48 -0
  288. package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.d.ts +6 -0
  289. package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.js +41 -0
  290. package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.js.map +1 -0
  291. package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.spec.ts +61 -0
  292. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.d.ts +6 -0
  293. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +33 -0
  294. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js.map +1 -0
  295. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.spec.ts +192 -0
  296. package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.d.ts +5 -0
  297. package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.js +39 -0
  298. package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.js.map +1 -0
  299. package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.spec.ts +84 -0
  300. package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.d.ts +5 -0
  301. package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.js +42 -0
  302. package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.js.map +1 -0
  303. package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.spec.ts +48 -0
  304. package/src/migrations/update-14-2-1/rename-blockList-metro-config.d.ts +6 -0
  305. package/src/migrations/update-14-2-1/rename-blockList-metro-config.js +33 -0
  306. package/src/migrations/update-14-2-1/rename-blockList-metro-config.js.map +1 -0
  307. package/src/migrations/update-14-2-1/rename-blockList-metro-config.spec.ts +190 -0
  308. package/src/migrations/update-14-5-5/add-exclude-sync-deps.d.ts +5 -0
  309. package/src/migrations/update-14-5-5/add-exclude-sync-deps.js +26 -0
  310. package/src/migrations/update-14-5-5/add-exclude-sync-deps.js.map +1 -0
  311. package/src/migrations/update-14-5-5/add-exclude-sync-deps.spec.ts +39 -0
  312. package/src/migrations/update-14-5-8/change-searchDir-storybook.d.ts +5 -0
  313. package/src/migrations/update-14-5-8/change-searchDir-storybook.js +26 -0
  314. package/src/migrations/update-14-5-8/change-searchDir-storybook.js.map +1 -0
  315. package/src/migrations/update-14-5-8/change-searchDir-storybook.spec.ts +39 -0
  316. package/src/migrations/update-14-6-0/remove-jest-transform.d.ts +5 -0
  317. package/src/migrations/update-14-6-0/remove-jest-transform.js +58 -0
  318. package/src/migrations/update-14-6-0/remove-jest-transform.js.map +1 -0
  319. package/src/migrations/update-14-6-0/remove-jest-transform.spec.ts +109 -0
  320. package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +2 -0
  321. package/src/migrations/update-15-0-0/add-babel-inputs.js +13 -0
  322. package/src/migrations/update-15-0-0/add-babel-inputs.js.map +1 -0
  323. package/src/migrations/update-15-0-0/add-babel-inputs.spec.ts +73 -0
  324. package/src/migrations/update-15-9-1/add-build-ios-target.d.ts +5 -0
  325. package/src/migrations/update-15-9-1/add-build-ios-target.js +34 -0
  326. package/src/migrations/update-15-9-1/add-build-ios-target.js.map +1 -0
  327. package/src/migrations/update-15-9-1/add-build-ios-target.spec.ts +36 -0
  328. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
  329. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
  330. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
  331. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.spec.ts +37 -0
  332. package/src/utils/add-jest.d.ts +2 -0
  333. package/src/utils/add-jest.js +38 -0
  334. package/src/utils/add-jest.js.map +1 -0
  335. package/src/utils/add-linting.d.ts +12 -0
  336. package/src/utils/add-linting.js +41 -0
  337. package/src/utils/add-linting.js.map +1 -0
  338. package/src/utils/add-linting.spec.ts +42 -0
  339. package/src/utils/chmod-android-gradle-files.d.ts +3 -0
  340. package/src/utils/chmod-android-gradle-files.js +24 -0
  341. package/src/utils/chmod-android-gradle-files.js.map +1 -0
  342. package/src/utils/ensure-node-modules-symlink.d.ts +9 -0
  343. package/src/utils/ensure-node-modules-symlink.js +29 -0
  344. package/src/utils/ensure-node-modules-symlink.js.map +1 -0
  345. package/src/utils/ensure-node-modules-symlink.spec.ts +108 -0
  346. package/src/utils/find-all-npm-dependencies.d.ts +2 -0
  347. package/src/utils/find-all-npm-dependencies.js +26 -0
  348. package/src/utils/find-all-npm-dependencies.js.map +1 -0
  349. package/src/utils/find-all-npm-dependencies.spec.ts +95 -0
  350. package/src/utils/format-file.d.ts +1 -0
  351. package/src/utils/format-file.js +17 -0
  352. package/src/utils/format-file.js.map +1 -0
  353. package/src/utils/get-cli-options.d.ts +8 -0
  354. package/src/utils/get-cli-options.js +31 -0
  355. package/src/utils/get-cli-options.js.map +1 -0
  356. package/src/utils/pod-install-task.d.ts +8 -0
  357. package/src/utils/pod-install-task.js +62 -0
  358. package/src/utils/pod-install-task.js.map +1 -0
  359. package/src/utils/symlink-task.d.ts +2 -0
  360. package/src/utils/symlink-task.js +19 -0
  361. package/src/utils/symlink-task.js.map +1 -0
  362. package/src/utils/testing-generators.d.ts +3 -0
  363. package/src/utils/testing-generators.js +36 -0
  364. package/src/utils/testing-generators.js.map +1 -0
  365. package/src/utils/versions.d.ts +20 -0
  366. package/src/utils/versions.js +24 -0
  367. package/src/utils/versions.js.map +1 -0
  368. package/typings/svg.d.ts +7 -0
@@ -0,0 +1,397 @@
1
+ import {
2
+ readJson,
3
+ readProjectConfiguration,
4
+ Tree,
5
+ updateJson,
6
+ } from '@nx/devkit';
7
+ import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
8
+ import libraryGenerator from './library';
9
+ import { Linter } from '@nx/linter';
10
+ import { Schema } from './schema';
11
+
12
+ describe('lib', () => {
13
+ let appTree: Tree;
14
+
15
+ const defaultSchema: Schema = {
16
+ name: 'myLib',
17
+ linter: Linter.EsLint,
18
+ skipFormat: false,
19
+ skipTsConfig: false,
20
+ unitTestRunner: 'jest',
21
+ strict: true,
22
+ };
23
+
24
+ beforeEach(() => {
25
+ appTree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
26
+ appTree.write('.gitignore', '');
27
+ });
28
+
29
+ describe('not nested', () => {
30
+ it('should update project.json', async () => {
31
+ await libraryGenerator(appTree, { ...defaultSchema, tags: 'one,two' });
32
+ const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
33
+ expect(projectConfiguration.root).toEqual('libs/my-lib');
34
+ expect(projectConfiguration.targets.build).toBeUndefined();
35
+ expect(projectConfiguration.targets.lint).toEqual({
36
+ executor: '@nrwl/linter:eslint',
37
+ outputs: ['{options.outputFile}'],
38
+ options: {
39
+ lintFilePatterns: ['libs/my-lib/**/*.{ts,tsx,js,jsx}'],
40
+ },
41
+ });
42
+ expect(projectConfiguration.tags).toEqual(['one', 'two']);
43
+ });
44
+
45
+ it('should update root tsconfig.base.json', async () => {
46
+ await libraryGenerator(appTree, defaultSchema);
47
+ const tsconfigJson = readJson(appTree, '/tsconfig.base.json');
48
+ expect(tsconfigJson.compilerOptions.paths['@proj/my-lib']).toEqual([
49
+ 'libs/my-lib/src/index.ts',
50
+ ]);
51
+ });
52
+
53
+ it('should update root tsconfig.json when no tsconfig.base.json', async () => {
54
+ appTree.rename('tsconfig.base.json', 'tsconfig.json');
55
+
56
+ await libraryGenerator(appTree, defaultSchema);
57
+
58
+ const tsconfigJson = readJson(appTree, '/tsconfig.json');
59
+ expect(tsconfigJson.compilerOptions.paths['@proj/my-lib']).toEqual([
60
+ 'libs/my-lib/src/index.ts',
61
+ ]);
62
+ });
63
+
64
+ it('should update root tsconfig.base.json (no existing path mappings)', async () => {
65
+ updateJson(appTree, 'tsconfig.base.json', (json) => {
66
+ json.compilerOptions.paths = undefined;
67
+ return json;
68
+ });
69
+
70
+ await libraryGenerator(appTree, defaultSchema);
71
+ const tsconfigJson = readJson(appTree, '/tsconfig.base.json');
72
+ expect(tsconfigJson.compilerOptions.paths['@proj/my-lib']).toEqual([
73
+ 'libs/my-lib/src/index.ts',
74
+ ]);
75
+ });
76
+
77
+ it('should create a local tsconfig.json', async () => {
78
+ await libraryGenerator(appTree, defaultSchema);
79
+
80
+ const tsconfigJson = readJson(appTree, 'libs/my-lib/tsconfig.json');
81
+ expect(tsconfigJson.extends).toBe('../../tsconfig.base.json');
82
+ expect(tsconfigJson.references).toEqual([
83
+ {
84
+ path: './tsconfig.lib.json',
85
+ },
86
+ {
87
+ path: './tsconfig.spec.json',
88
+ },
89
+ ]);
90
+ expect(
91
+ tsconfigJson.compilerOptions.forceConsistentCasingInFileNames
92
+ ).toEqual(true);
93
+ expect(tsconfigJson.compilerOptions.strict).toEqual(true);
94
+ expect(tsconfigJson.compilerOptions.noImplicitReturns).toEqual(true);
95
+ expect(tsconfigJson.compilerOptions.noFallthroughCasesInSwitch).toEqual(
96
+ true
97
+ );
98
+ });
99
+
100
+ it('should extend from root tsconfig.json when no tsconfig.base.json', async () => {
101
+ appTree.rename('tsconfig.base.json', 'tsconfig.json');
102
+
103
+ await libraryGenerator(appTree, defaultSchema);
104
+
105
+ const tsconfigJson = readJson(appTree, 'libs/my-lib/tsconfig.json');
106
+ expect(tsconfigJson.extends).toBe('../../tsconfig.json');
107
+ });
108
+
109
+ it('should extend the local tsconfig.json with tsconfig.spec.json', async () => {
110
+ await libraryGenerator(appTree, defaultSchema);
111
+ const tsconfigJson = readJson(appTree, 'libs/my-lib/tsconfig.spec.json');
112
+ expect(tsconfigJson.extends).toEqual('./tsconfig.json');
113
+ });
114
+
115
+ it('should extend the local tsconfig.json with tsconfig.lib.json', async () => {
116
+ await libraryGenerator(appTree, defaultSchema);
117
+ const tsconfigJson = readJson(appTree, 'libs/my-lib/tsconfig.lib.json');
118
+ expect(tsconfigJson.extends).toEqual('./tsconfig.json');
119
+ });
120
+ });
121
+
122
+ describe('nested', () => {
123
+ it('should update nx.json', async () => {
124
+ await libraryGenerator(appTree, {
125
+ ...defaultSchema,
126
+ directory: 'myDir',
127
+ tags: 'one',
128
+ });
129
+ const projectConfiguration = readProjectConfiguration(
130
+ appTree,
131
+ 'my-dir-my-lib'
132
+ );
133
+ expect(projectConfiguration).toMatchObject({
134
+ tags: ['one'],
135
+ });
136
+
137
+ await libraryGenerator(appTree, {
138
+ ...defaultSchema,
139
+ name: 'myLib2',
140
+ directory: 'myDir',
141
+ tags: 'one,two',
142
+ });
143
+
144
+ const lib2ProjectConfiguration = readProjectConfiguration(
145
+ appTree,
146
+ 'my-dir-my-lib2'
147
+ );
148
+ expect(lib2ProjectConfiguration).toMatchObject({
149
+ tags: ['one', 'two'],
150
+ });
151
+ });
152
+
153
+ it('should update project.json', async () => {
154
+ await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
155
+ const projectConfiguration = readProjectConfiguration(
156
+ appTree,
157
+ 'my-dir-my-lib'
158
+ );
159
+
160
+ expect(projectConfiguration.root).toEqual('libs/my-dir/my-lib');
161
+ expect(projectConfiguration.targets.lint).toEqual({
162
+ executor: '@nrwl/linter:eslint',
163
+ outputs: ['{options.outputFile}'],
164
+ options: {
165
+ lintFilePatterns: ['libs/my-dir/my-lib/**/*.{ts,tsx,js,jsx}'],
166
+ },
167
+ });
168
+ });
169
+
170
+ it('should update root tsconfig.base.json', async () => {
171
+ await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
172
+ const tsconfigJson = readJson(appTree, '/tsconfig.base.json');
173
+ expect(tsconfigJson.compilerOptions.paths['@proj/my-dir/my-lib']).toEqual(
174
+ ['libs/my-dir/my-lib/src/index.ts']
175
+ );
176
+ expect(
177
+ tsconfigJson.compilerOptions.paths['my-dir-my-lib/*']
178
+ ).toBeUndefined();
179
+ });
180
+
181
+ it('should update root tsconfig.json when no tsconfig.base.json', async () => {
182
+ appTree.rename('tsconfig.base.json', 'tsconfig.json');
183
+
184
+ await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
185
+
186
+ const tsconfigJson = readJson(appTree, '/tsconfig.json');
187
+ expect(tsconfigJson.compilerOptions.paths['@proj/my-dir/my-lib']).toEqual(
188
+ ['libs/my-dir/my-lib/src/index.ts']
189
+ );
190
+ expect(
191
+ tsconfigJson.compilerOptions.paths['my-dir-my-lib/*']
192
+ ).toBeUndefined();
193
+ });
194
+
195
+ it('should create a local tsconfig.json', async () => {
196
+ await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
197
+
198
+ const tsconfigJson = readJson(
199
+ appTree,
200
+ 'libs/my-dir/my-lib/tsconfig.json'
201
+ );
202
+ expect(tsconfigJson.extends).toBe('../../../tsconfig.base.json');
203
+ expect(tsconfigJson.references).toEqual([
204
+ {
205
+ path: './tsconfig.lib.json',
206
+ },
207
+ {
208
+ path: './tsconfig.spec.json',
209
+ },
210
+ ]);
211
+ });
212
+
213
+ it('should extend from root tsconfig.json when no tsconfig.base.json', async () => {
214
+ appTree.rename('tsconfig.base.json', 'tsconfig.json');
215
+
216
+ await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
217
+
218
+ const tsconfigJson = readJson(
219
+ appTree,
220
+ 'libs/my-dir/my-lib/tsconfig.json'
221
+ );
222
+ expect(tsconfigJson.extends).toBe('../../../tsconfig.json');
223
+ });
224
+ });
225
+
226
+ describe('--unit-test-runner none', () => {
227
+ it('should not generate test configuration', async () => {
228
+ await libraryGenerator(appTree, {
229
+ ...defaultSchema,
230
+ unitTestRunner: 'none',
231
+ });
232
+
233
+ expect(appTree.exists('libs/my-lib/tsconfig.spec.json')).toBeFalsy();
234
+ expect(appTree.exists('libs/my-lib/jest.config.ts')).toBeFalsy();
235
+ const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
236
+ expect(projectConfiguration.targets.test).toBeUndefined();
237
+ expect(projectConfiguration.targets.lint).toMatchObject({
238
+ executor: '@nrwl/linter:eslint',
239
+ options: {
240
+ lintFilePatterns: ['libs/my-lib/**/*.{ts,tsx,js,jsx}'],
241
+ },
242
+ outputs: ['{options.outputFile}'],
243
+ });
244
+ });
245
+ });
246
+
247
+ describe('--buildable', () => {
248
+ it('should have a builder defined', async () => {
249
+ await libraryGenerator(appTree, {
250
+ ...defaultSchema,
251
+ buildable: true,
252
+ });
253
+
254
+ const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
255
+
256
+ expect(projectConfiguration.targets.build).toBeDefined();
257
+ });
258
+ });
259
+
260
+ describe('--publishable', () => {
261
+ it('should add build architect', async () => {
262
+ await libraryGenerator(appTree, {
263
+ ...defaultSchema,
264
+ publishable: true,
265
+ importPath: '@proj/my-lib',
266
+ });
267
+
268
+ const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
269
+
270
+ expect(projectConfiguration.targets.build).toMatchObject({
271
+ executor: '@nrwl/web:rollup',
272
+ outputs: ['{options.outputPath}'],
273
+ options: {
274
+ external: ['react/jsx-runtime', 'react-native'],
275
+ entryFile: 'libs/my-lib/src/index.ts',
276
+ outputPath: 'dist/libs/my-lib',
277
+ project: 'libs/my-lib/package.json',
278
+ tsConfig: 'libs/my-lib/tsconfig.lib.json',
279
+ rollupConfig: '@nrwl/react/plugins/bundle-rollup',
280
+ },
281
+ });
282
+ });
283
+
284
+ it('should fail if no importPath is provided with publishable', async () => {
285
+ expect.assertions(1);
286
+
287
+ try {
288
+ await libraryGenerator(appTree, {
289
+ ...defaultSchema,
290
+ directory: 'myDir',
291
+ publishable: true,
292
+ });
293
+ } catch (e) {
294
+ expect(e.message).toContain(
295
+ 'For publishable libs you have to provide a proper "--importPath" which needs to be a valid npm package name (e.g. my-awesome-lib or @myorg/my-lib)'
296
+ );
297
+ }
298
+ });
299
+
300
+ it('should add package.json and .babelrc', async () => {
301
+ await libraryGenerator(appTree, {
302
+ ...defaultSchema,
303
+ publishable: true,
304
+ importPath: '@proj/my-lib',
305
+ });
306
+
307
+ const packageJson = readJson(appTree, '/libs/my-lib/package.json');
308
+ expect(packageJson.name).toEqual('@proj/my-lib');
309
+ expect(appTree.exists('/libs/my-lib/.babelrc'));
310
+ });
311
+ });
312
+
313
+ describe('--js', () => {
314
+ it('should generate JS files', async () => {
315
+ await libraryGenerator(appTree, {
316
+ ...defaultSchema,
317
+ js: true,
318
+ });
319
+
320
+ expect(appTree.exists('/libs/my-lib/src/index.js')).toBe(true);
321
+ });
322
+ });
323
+
324
+ describe('--importPath', () => {
325
+ it('should update the package.json & tsconfig with the given import path', async () => {
326
+ await libraryGenerator(appTree, {
327
+ ...defaultSchema,
328
+ publishable: true,
329
+ directory: 'myDir',
330
+ importPath: '@myorg/lib',
331
+ });
332
+ const packageJson = readJson(appTree, 'libs/my-dir/my-lib/package.json');
333
+ const tsconfigJson = readJson(appTree, '/tsconfig.base.json');
334
+
335
+ expect(packageJson.name).toBe('@myorg/lib');
336
+ expect(
337
+ tsconfigJson.compilerOptions.paths[packageJson.name]
338
+ ).toBeDefined();
339
+ });
340
+
341
+ it('should fail if the same importPath has already been used', async () => {
342
+ await libraryGenerator(appTree, {
343
+ ...defaultSchema,
344
+ name: 'myLib1',
345
+ publishable: true,
346
+ importPath: '@myorg/lib',
347
+ });
348
+
349
+ try {
350
+ await libraryGenerator(appTree, {
351
+ ...defaultSchema,
352
+ name: 'myLib2',
353
+ publishable: true,
354
+ importPath: '@myorg/lib',
355
+ });
356
+ } catch (e) {
357
+ expect(e.message).toContain(
358
+ 'You already have a library using the import path'
359
+ );
360
+ }
361
+
362
+ expect.assertions(1);
363
+ });
364
+ });
365
+
366
+ describe('--no-strict', () => {
367
+ it('should not add options for strict mode', async () => {
368
+ await libraryGenerator(appTree, {
369
+ ...defaultSchema,
370
+ strict: false,
371
+ });
372
+ const tsconfigJson = readJson(appTree, '/libs/my-lib/tsconfig.json');
373
+
374
+ expect(
375
+ tsconfigJson.compilerOptions.forceConsistentCasingInFileNames
376
+ ).not.toBeDefined();
377
+ expect(tsconfigJson.compilerOptions.strict).not.toBeDefined();
378
+ expect(tsconfigJson.compilerOptions.noImplicitReturns).not.toBeDefined();
379
+ expect(
380
+ tsconfigJson.compilerOptions.noFallthroughCasesInSwitch
381
+ ).not.toBeDefined();
382
+ });
383
+ });
384
+
385
+ describe('--skipPackageJson', () => {
386
+ it('should not add or update dependencies when true', async () => {
387
+ const packageJsonBefore = readJson(appTree, 'package.json');
388
+
389
+ await libraryGenerator(appTree, {
390
+ ...defaultSchema,
391
+ skipPackageJson: true,
392
+ });
393
+
394
+ expect(readJson(appTree, 'package.json')).toEqual(packageJsonBefore);
395
+ });
396
+ });
397
+ });
@@ -0,0 +1,22 @@
1
+ import { Linter } from '@nx/linter';
2
+
3
+ /**
4
+ * Same as the @nrwl/react library schema, except it removes keys: style, component, routing, appProject
5
+ */
6
+ export interface Schema {
7
+ name: string;
8
+ directory?: string;
9
+ skipTsConfig: boolean;
10
+ skipFormat: boolean;
11
+ tags?: string;
12
+ pascalCaseFiles?: boolean;
13
+ unitTestRunner: 'jest' | 'none';
14
+ linter: Linter;
15
+ publishable?: boolean;
16
+ buildable?: boolean;
17
+ importPath?: string;
18
+ js?: boolean;
19
+ strict?: boolean;
20
+ setParserOptionsProject?: boolean;
21
+ skipPackageJson?: boolean; //default is false
22
+ }
@@ -0,0 +1,102 @@
1
+ {
2
+ "cli": "nx",
3
+ "$id": "NxReactNativeLibrary",
4
+ "$schema": "http://json-schema.org/schema",
5
+ "title": "Create a React Native Library for Nx",
6
+ "description": "Create a React Native Library for Nx.",
7
+ "type": "object",
8
+ "examples": [
9
+ {
10
+ "command": "nx g @nrwl/react-native:lib mylib --directory=myapp",
11
+ "description": "Generate `libs/myapp/mylib`"
12
+ }
13
+ ],
14
+ "properties": {
15
+ "name": {
16
+ "type": "string",
17
+ "description": "Library name.",
18
+ "$default": {
19
+ "$source": "argv",
20
+ "index": 0
21
+ },
22
+ "x-prompt": "What name would you like to use for the library?",
23
+ "pattern": "^[a-zA-Z].*$"
24
+ },
25
+ "directory": {
26
+ "type": "string",
27
+ "description": "A directory where the lib is placed.",
28
+ "alias": "dir",
29
+ "x-priority": "important"
30
+ },
31
+ "linter": {
32
+ "description": "The tool to use for running lint checks.",
33
+ "type": "string",
34
+ "enum": ["eslint"],
35
+ "default": "eslint"
36
+ },
37
+ "unitTestRunner": {
38
+ "type": "string",
39
+ "enum": ["jest", "none"],
40
+ "description": "Test runner to use for unit tests.",
41
+ "default": "jest"
42
+ },
43
+ "tags": {
44
+ "type": "string",
45
+ "description": "Add tags to the library (used for linting).",
46
+ "alias": "t"
47
+ },
48
+ "skipFormat": {
49
+ "description": "Skip formatting files.",
50
+ "type": "boolean",
51
+ "default": false,
52
+ "x-priority": "internal"
53
+ },
54
+ "skipTsConfig": {
55
+ "type": "boolean",
56
+ "default": false,
57
+ "description": "Do not update `tsconfig.json` for development experience.",
58
+ "x-priority": "internal"
59
+ },
60
+ "pascalCaseFiles": {
61
+ "type": "boolean",
62
+ "description": "Use pascal case component file name (e.g. `App.tsx`).",
63
+ "alias": "P",
64
+ "default": false
65
+ },
66
+ "publishable": {
67
+ "type": "boolean",
68
+ "description": "Create a publishable library."
69
+ },
70
+ "buildable": {
71
+ "type": "boolean",
72
+ "default": false,
73
+ "description": "Generate a buildable library."
74
+ },
75
+ "importPath": {
76
+ "type": "string",
77
+ "description": "The library name used to import it, like `@myorg/my-awesome-lib`."
78
+ },
79
+ "js": {
80
+ "type": "boolean",
81
+ "description": "Generate JavaScript files rather than TypeScript files.",
82
+ "default": false
83
+ },
84
+ "strict": {
85
+ "type": "boolean",
86
+ "description": "Whether to enable tsconfig strict mode or not.",
87
+ "default": true
88
+ },
89
+ "setParserOptionsProject": {
90
+ "type": "boolean",
91
+ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
92
+ "default": false
93
+ },
94
+ "skipPackageJson": {
95
+ "description": "Do not add dependencies to `package.json`.",
96
+ "type": "boolean",
97
+ "default": false,
98
+ "x-priority": "internal"
99
+ }
100
+ },
101
+ "required": ["name"]
102
+ }
@@ -0,0 +1,5 @@
1
+ export interface StorybookStoriesSchema {
2
+ project: string;
3
+ ignorePaths?: string[];
4
+ skipFormat?: boolean;
5
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "NxReactNativeStorybookStories",
5
+ "title": "Generate React Native Storybook stories",
6
+ "description": "Generate stories/specs for all components declared in a React Native project.",
7
+ "type": "object",
8
+ "properties": {
9
+ "project": {
10
+ "type": "string",
11
+ "aliases": ["name", "projectName"],
12
+ "description": "Project for which to generate stories.",
13
+ "$default": {
14
+ "$source": "projectName",
15
+ "index": 0
16
+ },
17
+ "x-prompt": "For which project do you want to generate stories?"
18
+ },
19
+ "ignorePaths": {
20
+ "type": "array",
21
+ "description": "Paths to ignore when looking for components.",
22
+ "items": {
23
+ "type": "string",
24
+ "description": "Path to ignore."
25
+ },
26
+ "examples": [
27
+ "apps/my-app/src/not-stories/**",
28
+ "**/**/src/**/not-stories/**",
29
+ "libs/my-lib/**/*.something.ts",
30
+ "**/**/src/**/*.other.*",
31
+ "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts"
32
+ ]
33
+ },
34
+ "skipFormat": {
35
+ "description": "Skip formatting files.",
36
+ "type": "boolean",
37
+ "default": false,
38
+ "x-priority": "internal"
39
+ }
40
+ },
41
+ "required": ["project"]
42
+ }