@nx/expo 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 (243) 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/collection.json +0 -0
  6. package/docs/build-list-examples.md +71 -0
  7. package/docs/prebuild-examples.md +70 -0
  8. package/docs/run-examples.md +91 -0
  9. package/docs/start-examples.md +98 -0
  10. package/executors.json +116 -0
  11. package/generators.json +61 -0
  12. package/index.d.ts +4 -0
  13. package/index.js +12 -0
  14. package/index.js.map +1 -0
  15. package/migrations.json +734 -0
  16. package/package.json +59 -0
  17. package/plugins/jest/svg-mock.d.ts +0 -0
  18. package/plugins/jest/svg-mock.js +4 -0
  19. package/plugins/jest/svg-mock.js.map +1 -0
  20. package/plugins/metro-resolver.d.ts +1 -0
  21. package/plugins/metro-resolver.js +135 -0
  22. package/plugins/metro-resolver.js.map +1 -0
  23. package/plugins/with-nx-metro.d.ts +8 -0
  24. package/plugins/with-nx-metro.js +31 -0
  25. package/plugins/with-nx-metro.js.map +1 -0
  26. package/plugins/with-nx-webpack.d.ts +5 -0
  27. package/plugins/with-nx-webpack.js +52 -0
  28. package/plugins/with-nx-webpack.js.map +1 -0
  29. package/project.json +61 -0
  30. package/src/executors/build/build.impl.d.ts +6 -0
  31. package/src/executors/build/build.impl.js +62 -0
  32. package/src/executors/build/build.impl.js.map +1 -0
  33. package/src/executors/build/compat.d.ts +2 -0
  34. package/src/executors/build/compat.js +6 -0
  35. package/src/executors/build/compat.js.map +1 -0
  36. package/src/executors/build/schema.d.ts +14 -0
  37. package/src/executors/build/schema.json +60 -0
  38. package/src/executors/build-list/build-fragment.d.ts +54 -0
  39. package/src/executors/build-list/build-list.impl.d.ts +7 -0
  40. package/src/executors/build-list/build-list.impl.js +86 -0
  41. package/src/executors/build-list/build-list.impl.js.map +1 -0
  42. package/src/executors/build-list/compat.d.ts +2 -0
  43. package/src/executors/build-list/compat.js +6 -0
  44. package/src/executors/build-list/compat.js.map +1 -0
  45. package/src/executors/build-list/schema.d.ts +25 -0
  46. package/src/executors/build-list/schema.json +79 -0
  47. package/src/executors/download/compat.d.ts +2 -0
  48. package/src/executors/download/compat.js +6 -0
  49. package/src/executors/download/compat.js.map +1 -0
  50. package/src/executors/download/download.impl.d.ts +15 -0
  51. package/src/executors/download/download.impl.js +101 -0
  52. package/src/executors/download/download.impl.js.map +1 -0
  53. package/src/executors/download/schema.d.ts +3 -0
  54. package/src/executors/download/schema.json +59 -0
  55. package/src/executors/ensure-symlink/compat.d.ts +2 -0
  56. package/src/executors/ensure-symlink/compat.js +6 -0
  57. package/src/executors/ensure-symlink/compat.js.map +1 -0
  58. package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +5 -0
  59. package/src/executors/ensure-symlink/ensure-symlink.impl.js +13 -0
  60. package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +1 -0
  61. package/src/executors/ensure-symlink/schema.json +11 -0
  62. package/src/executors/export/compat.d.ts +2 -0
  63. package/src/executors/export/compat.js +6 -0
  64. package/src/executors/export/compat.js.map +1 -0
  65. package/src/executors/export/export.impl.d.ts +6 -0
  66. package/src/executors/export/export.impl.js +69 -0
  67. package/src/executors/export/export.impl.js.map +1 -0
  68. package/src/executors/export/schema.d.ts +11 -0
  69. package/src/executors/export/schema.json +48 -0
  70. package/src/executors/install/compat.d.ts +2 -0
  71. package/src/executors/install/compat.js +6 -0
  72. package/src/executors/install/compat.js.map +1 -0
  73. package/src/executors/install/install.impl.d.ts +7 -0
  74. package/src/executors/install/install.impl.js +70 -0
  75. package/src/executors/install/install.impl.js.map +1 -0
  76. package/src/executors/install/schema.d.ts +7 -0
  77. package/src/executors/install/schema.json +34 -0
  78. package/src/executors/prebuild/compat.d.ts +2 -0
  79. package/src/executors/prebuild/compat.js +6 -0
  80. package/src/executors/prebuild/compat.js.map +1 -0
  81. package/src/executors/prebuild/prebuild.impl.d.ts +7 -0
  82. package/src/executors/prebuild/prebuild.impl.js +70 -0
  83. package/src/executors/prebuild/prebuild.impl.js.map +1 -0
  84. package/src/executors/prebuild/schema.d.ts +7 -0
  85. package/src/executors/prebuild/schema.json +35 -0
  86. package/src/executors/run/compat.d.ts +2 -0
  87. package/src/executors/run/compat.js +6 -0
  88. package/src/executors/run/compat.js.map +1 -0
  89. package/src/executors/run/run.impl.d.ts +6 -0
  90. package/src/executors/run/run.impl.js +112 -0
  91. package/src/executors/run/run.impl.js.map +1 -0
  92. package/src/executors/run/schema.d.ts +25 -0
  93. package/src/executors/run/schema.json +71 -0
  94. package/src/executors/start/compat.d.ts +2 -0
  95. package/src/executors/start/compat.js +6 -0
  96. package/src/executors/start/compat.js.map +1 -0
  97. package/src/executors/start/schema.d.ts +22 -0
  98. package/src/executors/start/schema.json +93 -0
  99. package/src/executors/start/start.impl.d.ts +7 -0
  100. package/src/executors/start/start.impl.js +73 -0
  101. package/src/executors/start/start.impl.js.map +1 -0
  102. package/src/executors/sync-deps/compat.d.ts +2 -0
  103. package/src/executors/sync-deps/compat.js +6 -0
  104. package/src/executors/sync-deps/compat.js.map +1 -0
  105. package/src/executors/sync-deps/schema.d.ts +4 -0
  106. package/src/executors/sync-deps/schema.json +28 -0
  107. package/src/executors/sync-deps/sync-deps.impl.d.ts +8 -0
  108. package/src/executors/sync-deps/sync-deps.impl.js +62 -0
  109. package/src/executors/sync-deps/sync-deps.impl.js.map +1 -0
  110. package/src/executors/update/compat.d.ts +2 -0
  111. package/src/executors/update/compat.js +6 -0
  112. package/src/executors/update/compat.js.map +1 -0
  113. package/src/executors/update/schema.d.ts +15 -0
  114. package/src/executors/update/schema.json +65 -0
  115. package/src/executors/update/update.impl.d.ts +6 -0
  116. package/src/executors/update/update.impl.js +59 -0
  117. package/src/executors/update/update.impl.js.map +1 -0
  118. package/src/generators/application/application.d.ts +5 -0
  119. package/src/generators/application/application.js +33 -0
  120. package/src/generators/application/application.js.map +1 -0
  121. package/src/generators/application/files/app.json.template +33 -0
  122. package/src/generators/application/files/assets/adaptive-icon.png +0 -0
  123. package/src/generators/application/files/assets/favicon.png +0 -0
  124. package/src/generators/application/files/assets/icon.png +0 -0
  125. package/src/generators/application/files/assets/splash.png +0 -0
  126. package/src/generators/application/files/babel.config.js.template +6 -0
  127. package/src/generators/application/files/eas.json.template +28 -0
  128. package/src/generators/application/files/index.js.template +8 -0
  129. package/src/generators/application/files/metro.config.js.template +25 -0
  130. package/src/generators/application/files/package.json.template +17 -0
  131. package/src/generators/application/files/src/app/App.spec.tsx.template +9 -0
  132. package/src/generators/application/files/src/app/App.tsx.template +694 -0
  133. package/src/generators/application/files/test-setup.ts.template +1 -0
  134. package/src/generators/application/files/tsconfig.app.json.template +9 -0
  135. package/src/generators/application/files/tsconfig.json.template +26 -0
  136. package/src/generators/application/lib/add-detox.d.ts +3 -0
  137. package/src/generators/application/lib/add-detox.js +16 -0
  138. package/src/generators/application/lib/add-detox.js.map +1 -0
  139. package/src/generators/application/lib/add-project.d.ts +3 -0
  140. package/src/generators/application/lib/add-project.js +91 -0
  141. package/src/generators/application/lib/add-project.js.map +1 -0
  142. package/src/generators/application/lib/create-application-files.d.ts +3 -0
  143. package/src/generators/application/lib/create-application-files.js +24 -0
  144. package/src/generators/application/lib/create-application-files.js.map +1 -0
  145. package/src/generators/application/lib/normalize-options.d.ts +10 -0
  146. package/src/generators/application/lib/normalize-options.js +30 -0
  147. package/src/generators/application/lib/normalize-options.js.map +1 -0
  148. package/src/generators/application/schema.d.ts +19 -0
  149. package/src/generators/application/schema.json +88 -0
  150. package/src/generators/component/component.d.ts +5 -0
  151. package/src/generators/component/component.js +51 -0
  152. package/src/generators/component/component.js.map +1 -0
  153. package/src/generators/component/files/__fileName__.spec.tsx.template +11 -0
  154. package/src/generators/component/files/__fileName__.tsx.template +32 -0
  155. package/src/generators/component/lib/add-import.d.ts +3 -0
  156. package/src/generators/component/lib/add-import.js +30 -0
  157. package/src/generators/component/lib/add-import.js.map +1 -0
  158. package/src/generators/component/lib/normalize-options.d.ts +8 -0
  159. package/src/generators/component/lib/normalize-options.js +58 -0
  160. package/src/generators/component/lib/normalize-options.js.map +1 -0
  161. package/src/generators/component/schema.d.ts +15 -0
  162. package/src/generators/component/schema.json +83 -0
  163. package/src/generators/init/init.d.ts +6 -0
  164. package/src/generators/init/init.js +69 -0
  165. package/src/generators/init/init.js.map +1 -0
  166. package/src/generators/init/lib/add-git-ignore-entry.d.ts +2 -0
  167. package/src/generators/init/lib/add-git-ignore-entry.js +19 -0
  168. package/src/generators/init/lib/add-git-ignore-entry.js.map +1 -0
  169. package/src/generators/init/lib/gitignore-entries.d.ts +1 -0
  170. package/src/generators/init/lib/gitignore-entries.js +20 -0
  171. package/src/generators/init/lib/gitignore-entries.js.map +1 -0
  172. package/src/generators/init/lib/init-root-babel-config.d.ts +2 -0
  173. package/src/generators/init/lib/init-root-babel-config.js +14 -0
  174. package/src/generators/init/lib/init-root-babel-config.js.map +1 -0
  175. package/src/generators/init/schema.d.ts +7 -0
  176. package/src/generators/init/schema.json +38 -0
  177. package/src/generators/library/files/lib/README.md +7 -0
  178. package/src/generators/library/files/lib/babel.config.json +17 -0
  179. package/src/generators/library/files/lib/package.json.template +5 -0
  180. package/src/generators/library/files/lib/src/index.ts.template +0 -0
  181. package/src/generators/library/files/lib/test-setup.ts.template +1 -0
  182. package/src/generators/library/files/lib/tsconfig.json.template +16 -0
  183. package/src/generators/library/files/lib/tsconfig.lib.json.template +9 -0
  184. package/src/generators/library/lib/normalize-options.d.ts +12 -0
  185. package/src/generators/library/lib/normalize-options.js +27 -0
  186. package/src/generators/library/lib/normalize-options.js.map +1 -0
  187. package/src/generators/library/library.d.ts +5 -0
  188. package/src/generators/library/library.js +101 -0
  189. package/src/generators/library/library.js.map +1 -0
  190. package/src/generators/library/schema.d.ts +22 -0
  191. package/src/generators/library/schema.json +99 -0
  192. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.d.ts +6 -0
  193. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +35 -0
  194. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js.map +1 -0
  195. package/src/migrations/update-14-1-2/add-eject-target-14-1-2.d.ts +5 -0
  196. package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js +25 -0
  197. package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js.map +1 -0
  198. package/src/migrations/update-14-4-3/add-eas-build-target.d.ts +5 -0
  199. package/src/migrations/update-14-4-3/add-eas-build-target.js +42 -0
  200. package/src/migrations/update-14-4-3/add-eas-build-target.js.map +1 -0
  201. package/src/migrations/update-14-5-1/add-eas-update-target.d.ts +5 -0
  202. package/src/migrations/update-14-5-1/add-eas-update-target.js +27 -0
  203. package/src/migrations/update-14-5-1/add-eas-update-target.js.map +1 -0
  204. package/src/migrations/update-15-0-3/add-new-expo-cli-targets.d.ts +9 -0
  205. package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js +66 -0
  206. package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js.map +1 -0
  207. package/src/migrations/update-15-0-3/change-jest-preset.d.ts +8 -0
  208. package/src/migrations/update-15-0-3/change-jest-preset.js +74 -0
  209. package/src/migrations/update-15-0-3/change-jest-preset.js.map +1 -0
  210. package/src/migrations/update-15-8-3/change-webpack-to-metro.d.ts +8 -0
  211. package/src/migrations/update-15-8-3/change-webpack-to-metro.js +37 -0
  212. package/src/migrations/update-15-8-3/change-webpack-to-metro.js.map +1 -0
  213. package/src/migrations/update-16-0-0/remove-deprecated-targets.d.ts +5 -0
  214. package/src/migrations/update-16-0-0/remove-deprecated-targets.js +36 -0
  215. package/src/migrations/update-16-0-0/remove-deprecated-targets.js.map +1 -0
  216. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
  217. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
  218. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
  219. package/src/utils/add-jest.d.ts +2 -0
  220. package/src/utils/add-jest.js +39 -0
  221. package/src/utils/add-jest.js.map +1 -0
  222. package/src/utils/add-linting.d.ts +3 -0
  223. package/src/utils/add-linting.js +37 -0
  224. package/src/utils/add-linting.js.map +1 -0
  225. package/src/utils/ensure-node-modules-symlink.d.ts +9 -0
  226. package/src/utils/ensure-node-modules-symlink.js +29 -0
  227. package/src/utils/ensure-node-modules-symlink.js.map +1 -0
  228. package/src/utils/find-all-npm-dependencies.d.ts +2 -0
  229. package/src/utils/find-all-npm-dependencies.js +26 -0
  230. package/src/utils/find-all-npm-dependencies.js.map +1 -0
  231. package/src/utils/pod-install-task.d.ts +8 -0
  232. package/src/utils/pod-install-task.js +53 -0
  233. package/src/utils/pod-install-task.js.map +1 -0
  234. package/src/utils/symlink-task.d.ts +2 -0
  235. package/src/utils/symlink-task.js +19 -0
  236. package/src/utils/symlink-task.js.map +1 -0
  237. package/src/utils/versions.d.ts +20 -0
  238. package/src/utils/versions.js +24 -0
  239. package/src/utils/versions.js.map +1 -0
  240. package/tsconfig.json +13 -0
  241. package/tsconfig.lib.json +11 -0
  242. package/tsconfig.spec.json +20 -0
  243. package/typings/svg.d.ts +6 -0
package/.eslintrc.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "extends": "../../.eslintrc",
3
+ "rules": {},
4
+ "ignorePatterns": ["!**/*"],
5
+ "overrides": [
6
+ {
7
+ "files": [
8
+ "./package.json",
9
+ "./generators.json",
10
+ "./executors.json",
11
+ "./migrations.json"
12
+ ],
13
+ "parser": "jsonc-eslint-parser",
14
+ "rules": {
15
+ "@nrwl/nx/nx-plugin-checks": "error"
16
+ }
17
+ }
18
+ ]
19
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+
7
+
8
+ **Note:** Version bump only for package @nx/expo
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2017-2023 Narwhal Technologies Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ 'Software'), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ <p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
2
+
3
+ <div style="text-align: center;">
4
+
5
+ [![CircleCI](https://circleci.com/gh/nrwl/nx.svg?style=svg)](https://circleci.com/gh/nrwl/nx)
6
+ [![License](https://img.shields.io/npm/l/@nrwl/workspace.svg?style=flat-square)]()
7
+ [![NPM Version](https://badge.fury.io/js/%40nrwl%2Fworkspace.svg)](https://www.npmjs.com/@nrwl/workspace)
8
+ [![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)]()
9
+ [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
10
+ [![Join the chat at https://gitter.im/nrwl-nx/community](https://badges.gitter.im/nrwl-nx/community.svg)](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
11
+ [![Join us @nrwl/community on slack](https://img.shields.io/badge/slack-%40nrwl%2Fcommunity-brightgreen)](https://join.slack.com/t/nrwlcommunity/shared_invite/enQtNzU5MTE4OTQwOTk0LTgxY2E0ZWYzMWE0YzA5ZDA2MWM1NDVhNmI2ZWMyYmZhNWJiODk3MjkxZjY3MzU5ZjRmM2NmNWU1OTgyZmE4Mzc)
12
+
13
+ </div>
14
+
15
+
16
+ <hr>
17
+
18
+ # Nx: Smart, Fast and Extensible Build System
19
+
20
+ Nx is a next generation build system with first class monorepo support and powerful integrations.
21
+
22
+ This package is a [Expo plugin for Nx](https://nx.dev/expo/overview).
23
+
24
+ ## Getting Started
25
+
26
+ ### Creating an Nx Workspace
27
+
28
+ **Using `npx`**
29
+
30
+ ```bash
31
+ npx create-nx-workspace
32
+ ```
33
+
34
+ **Using `npm init`**
35
+
36
+ ```bash
37
+ npm init nx-workspace
38
+ ```
39
+
40
+ **Using `yarn create`**
41
+
42
+ ```bash
43
+ yarn create nx-workspace
44
+ ```
45
+
46
+ ### Adding Nx to an Existing Repository
47
+
48
+ Run:
49
+
50
+ ```bash
51
+ npx nx@latest init
52
+ ```
53
+
54
+ ## Documentation & Resources
55
+
56
+ - [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
57
+ - [Intro to Nx](https://nx.dev/getting-started/intro)
58
+ - [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
59
+ - [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
60
+
61
+ <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
62
+ width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
63
+
File without changes
@@ -0,0 +1,71 @@
1
+ The `build-list` command allows to check the details of your Expo Application Services (EAS) build status.
2
+
3
+ `project.json`:
4
+
5
+ ```json
6
+ {
7
+ "name": "mobile",
8
+ //...
9
+ "targets": {
10
+ //...
11
+ "build-list": {
12
+ "executor": "@nrwl/expo:build-list",
13
+ "options": {}
14
+ }
15
+ //...
16
+ }
17
+ }
18
+ ```
19
+
20
+ ```shell
21
+ nx run mobile:build-list
22
+ ```
23
+
24
+ ## Examples
25
+
26
+ {% tabs %}
27
+ {% tab label="Get Status of Different Platforms" %}
28
+ The `platform` option allows you to check build status of different platform (e.g. android, ios, all):
29
+
30
+ ```json
31
+ "build-list": {
32
+ "executor": "@nrwl/expo:build-list",
33
+ "options": {
34
+ "platform": "ios"
35
+ }
36
+ }
37
+ ```
38
+
39
+ {% /tab %}
40
+ {% tab label="Get Status Interactively" %}
41
+
42
+ The `interactive` option allows you to specify whether to use interactive mode:
43
+
44
+ ```json
45
+ "build-list": {
46
+ "executor": "@nrwl/expo:build-list",
47
+ "options": {
48
+ "interactive": true
49
+ }
50
+ }
51
+ ```
52
+
53
+ {% /tab %}
54
+ {% tab label="Get Status in JSON Format" %}
55
+
56
+ The `json` option allows you to print the output in JSON format:
57
+
58
+ ```json
59
+ "build-list": {
60
+ "executor": "@nrwl/expo:build-list",
61
+ "options": {
62
+ "interactive": false,
63
+ "json": true
64
+ }
65
+ }
66
+ ```
67
+
68
+ {% /tab %}
69
+ {% /tabs %}
70
+
71
+ ---
@@ -0,0 +1,70 @@
1
+ The `prebuild` command generates native code before a native app can compile.
2
+
3
+ `project.json`:
4
+
5
+ ```json
6
+ {
7
+ "name": "mobile",
8
+ //...
9
+ "targets": {
10
+ //...
11
+ "prebuild": {
12
+ "executor": "@nrwl/expo:prebuild",
13
+ "options": {}
14
+ }
15
+ //...
16
+ }
17
+ }
18
+ ```
19
+
20
+ ```shell
21
+ nx run mobile:prebuild
22
+ ```
23
+
24
+ ## Examples
25
+
26
+ {% tabs %}
27
+ {% tab label="Generate Native Code for Different Platforms" %}
28
+ The `platform` option allows you to specify the platform to generate native code for (e.g. android, ios, all).
29
+
30
+ ```json
31
+ "prebuild": {
32
+ "executor": "@nrwl/expo:prebuild",
33
+ "options": {
34
+ "platform": "android"
35
+ }
36
+ }
37
+ ```
38
+
39
+ {% /tab %}
40
+ {% tab label="Regenerate Native Code" %}
41
+
42
+ The `clean` option allows you to delete the native folders and regenerate them before apply changes.
43
+
44
+ ```json
45
+ "prebuild": {
46
+ "executor": "@nrwl/expo:prebuild",
47
+ "options": {
48
+ "clean": true
49
+ }
50
+ }
51
+ ```
52
+
53
+ {% /tab %}
54
+ {% tab label="Install NPM Packages and CocoaPods" %}
55
+
56
+ The `install` option allows you to install NPM Packages and CocoaPods.
57
+
58
+ ```json
59
+ "prebuild": {
60
+ "executor": "@nrwl/expo:prebuild",
61
+ "options": {
62
+ "install": true
63
+ }
64
+ }
65
+ ```
66
+
67
+ {% /tab %}
68
+ {% /tabs %}
69
+
70
+ ---
@@ -0,0 +1,91 @@
1
+ The `run` command allows you to compile your app locally.
2
+
3
+ `project.json`:
4
+
5
+ ```json
6
+ {
7
+ "name": "mobile",
8
+ //...
9
+ "targets": {
10
+ //...
11
+ "run-ios": {
12
+ "executor": "@nrwl/expo:run",
13
+ "options": {
14
+ "platform": "ios"
15
+ }
16
+ },
17
+ "run-android": {
18
+ "executor": "@nrwl/expo:run",
19
+ "options": {
20
+ "platform": "android"
21
+ }
22
+ }
23
+ //...
24
+ }
25
+ }
26
+ ```
27
+
28
+ ```shell
29
+ nx run mobile:run-ios
30
+ nx run mobile:run-android
31
+ ```
32
+
33
+ ## Examples
34
+
35
+ {% tabs %}
36
+ {% tab label="Compile Android with Different Variants" %}
37
+ The `variant` option allows you to specify the compile Android app with variants defined in `build.gradle` file (e.g. debug, release).
38
+
39
+ ```json
40
+ "run-android": {
41
+ "executor": "@nrwl/expo:run",
42
+ "options": {
43
+ "platform": "android",
44
+ "variant": "release"
45
+ }
46
+ }
47
+ ```
48
+
49
+ {% /tab %}
50
+ {% tab label="Compile iOS with Different Configurations" %}
51
+
52
+ The `xcodeConfiguration` option allows you to specify Xcode configuration to use (e.g. Debug or Release).
53
+
54
+ ```json
55
+ "run-ios": {
56
+ "executor": "@nrwl/expo:run",
57
+ "options": {
58
+ "platform": "ios",
59
+ "xcodeConfiguration": "Release"
60
+ }
61
+ }
62
+ ```
63
+
64
+ {% /tab %}
65
+ {% tab label="Run on a device" %}
66
+
67
+ The `device` option allows you to launch your app in a specific device name or UDID.
68
+ To see all your iOS simulators: run `xcrun simctl list`.
69
+ To see all your Android emulators, run: `emulator -list-avds`.
70
+
71
+ ```json
72
+ "run-ios": {
73
+ "executor": "@nrwl/expo:run",
74
+ "options": {
75
+ "platform": "ios",
76
+ "device": "iPhone 14"
77
+ }
78
+ },
79
+ "run-android": {
80
+ "executor": "@nrwl/expo:run",
81
+ "options": {
82
+ "platform": "android",
83
+ "device": "Pixel_XL_API_Tiramisu"
84
+ }
85
+ }
86
+ ```
87
+
88
+ {% /tab %}
89
+ {% /tabs %}
90
+
91
+ ---
@@ -0,0 +1,98 @@
1
+ `project.json`:
2
+
3
+ ```json
4
+ {
5
+ "name": "mobile",
6
+ //...
7
+ "targets": {
8
+ //...
9
+ "start": {
10
+ "executor": "@nrwl/expo:start",
11
+ "options": {
12
+ "port": 8081
13
+ }
14
+ }
15
+ //...
16
+ }
17
+ }
18
+ ```
19
+
20
+ ```shell
21
+ nx run mobile:start
22
+ ```
23
+
24
+ ## Examples
25
+
26
+ {% tabs %}
27
+ {% tab label="Specify starting on platform" %}
28
+ The `ios`, `android` and `web` option allows you to start the server on different platforms.
29
+
30
+ Opens your app in Expo Go in a currently running iOS simulator on your computer:
31
+
32
+ ```json
33
+ "start": {
34
+ "executor": "@nrwl/expo:start",
35
+ "options": {
36
+ "port": 8081,
37
+ "ios": true
38
+ }
39
+ }
40
+ ```
41
+
42
+ Opens your app in Expo Go on a connected Android device
43
+
44
+ ```json
45
+ "start": {
46
+ "executor": "@nrwl/expo:start",
47
+ "options": {
48
+ "port": 8081,
49
+ "android": true
50
+ }
51
+ }
52
+ ```
53
+
54
+ Opens your app in a web browser:
55
+
56
+ ```json
57
+ "start": {
58
+ "executor": "@nrwl/expo:start",
59
+ "options": {
60
+ "port": 8081,
61
+ "web": true
62
+ }
63
+ }
64
+ ```
65
+
66
+ {% /tab %}
67
+ {% tab label="Specify the host" %}
68
+ The `host` option allows you to specify the type of host to use. `lan` uses the local network; `tunnel` ues any network by tunnel through ngrok; `localhost` connects to the dev server over localhost.
69
+
70
+ ```json
71
+ "start": {
72
+ "executor": "@nrwl/expo:start",
73
+ "options": {
74
+ "port": 8081,
75
+ "host": "localhost"
76
+ }
77
+ }
78
+ ```
79
+
80
+ {% /tab %}
81
+ {% tab label="Starts the server with cache reset" %}
82
+
83
+ The `clear` option allows you to remove Metro bundler cache.
84
+
85
+ ```json
86
+ "start": {
87
+ "executor": "@nrwl/expo:start",
88
+ "options": {
89
+ "port": 8081,
90
+ "clear": true
91
+ }
92
+ }
93
+ ```
94
+
95
+ {% /tab %}
96
+ {% /tabs %}
97
+
98
+ ---
package/executors.json ADDED
@@ -0,0 +1,116 @@
1
+ {
2
+ "executors": {
3
+ "update": {
4
+ "implementation": "./src/executors/update/update.impl",
5
+ "schema": "./src/executors/update/schema.json",
6
+ "description": "Start an EAS update for your expo project"
7
+ },
8
+ "build": {
9
+ "implementation": "./src/executors/build/build.impl",
10
+ "schema": "./src/executors/build/schema.json",
11
+ "description": "Start an EAS build for your expo project"
12
+ },
13
+ "build-list": {
14
+ "implementation": "./src/executors/build-list/build-list.impl",
15
+ "schema": "./src/executors/build-list/schema.json",
16
+ "description": "List all EAS builds for your Expo project"
17
+ },
18
+ "download": {
19
+ "implementation": "./src/executors/download/download.impl",
20
+ "schema": "./src/executors/download/schema.json",
21
+ "description": "Download an EAS build"
22
+ },
23
+ "run": {
24
+ "implementation": "./src/executors/run/run.impl",
25
+ "schema": "./src/executors/run/schema.json",
26
+ "description": "Run the Android app binary locally or run the iOS app binary locally"
27
+ },
28
+ "start": {
29
+ "implementation": "./src/executors/start/start.impl",
30
+ "schema": "./src/executors/start/schema.json",
31
+ "description": "Start a local dev server for the app or start a Webpack dev server for the web app"
32
+ },
33
+ "sync-deps": {
34
+ "implementation": "./src/executors/sync-deps/sync-deps.impl",
35
+ "schema": "./src/executors/sync-deps/schema.json",
36
+ "description": "Syncs dependencies to package.json (required for autolinking)."
37
+ },
38
+ "ensure-symlink": {
39
+ "implementation": "./src/executors/ensure-symlink/ensure-symlink.impl",
40
+ "schema": "./src/executors/ensure-symlink/schema.json",
41
+ "description": "Ensure workspace node_modules is symlink under app's node_modules folder."
42
+ },
43
+ "prebuild": {
44
+ "implementation": "./src/executors/prebuild/prebuild.impl",
45
+ "schema": "./src/executors/prebuild/schema.json",
46
+ "description": "Create native iOS and Android project files for building natively."
47
+ },
48
+ "install": {
49
+ "implementation": "./src/executors/install/install.impl",
50
+ "schema": "./src/executors/install/schema.json",
51
+ "description": "Install a module or other package to a project."
52
+ },
53
+ "export": {
54
+ "implementation": "./src/executors/export/export.impl",
55
+ "schema": "./src/executors/export/schema.json",
56
+ "description": "Export the JavaScript and assets for your app using Metro/webpack bundler"
57
+ }
58
+ },
59
+ "builders": {
60
+ "update": {
61
+ "implementation": "./src/executors/update/compat",
62
+ "schema": "./src/executors/update/schema.json",
63
+ "description": "Start an EAS update for your expo project"
64
+ },
65
+ "build": {
66
+ "implementation": "./src/executors/build/compat",
67
+ "schema": "./src/executors/build/schema.json",
68
+ "description": "Start an EAS build for your expo project"
69
+ },
70
+ "build-list": {
71
+ "implementation": "./src/executors/build-list/compat",
72
+ "schema": "./src/executors/build-list/schema.json",
73
+ "description": "List all EAS builds for your Expo project"
74
+ },
75
+ "download": {
76
+ "implementation": "./src/executors/download/compat",
77
+ "schema": "./src/executors/download/schema.json",
78
+ "description": "Download an EAS build"
79
+ },
80
+ "run": {
81
+ "implementation": "./src/executors/run/compat",
82
+ "schema": "./src/executors/run/schema.json",
83
+ "description": "Run the Android app binary locally or run the iOS app binary locally"
84
+ },
85
+ "start": {
86
+ "implementation": "./src/executors/start/compat",
87
+ "schema": "./src/executors/start/schema.json",
88
+ "description": "Start a local dev server for the app or start a Webpack dev server for the web app"
89
+ },
90
+ "sync-deps": {
91
+ "implementation": "./src/executors/sync-deps/compat",
92
+ "schema": "./src/executors/sync-deps/schema.json",
93
+ "description": "Syncs dependencies to package.json (required for autolinking)."
94
+ },
95
+ "ensure-symlink": {
96
+ "implementation": "./src/executors/ensure-symlink/compat",
97
+ "schema": "./src/executors/ensure-symlink/schema.json",
98
+ "description": "Ensure workspace node_modules is symlink under app's node_modules folder."
99
+ },
100
+ "prebuild": {
101
+ "implementation": "./src/executors/prebuild/compat",
102
+ "schema": "./src/executors/prebuild/schema.json",
103
+ "description": "Create native iOS and Android project files for building natively."
104
+ },
105
+ "install": {
106
+ "implementation": "./src/executors/install/compat",
107
+ "schema": "./src/executors/install/schema.json",
108
+ "description": "Install a module or other package to a project."
109
+ },
110
+ "export": {
111
+ "implementation": "./src/executors/export/compat",
112
+ "schema": "./src/executors/export/schema.json",
113
+ "description": "Export the JavaScript and assets for your app using Metro/webpack bundler"
114
+ }
115
+ }
116
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "Nx Expo",
3
+ "version": "0.1",
4
+ "extends": ["@nrwl/workspace"],
5
+ "schematics": {
6
+ "init": {
7
+ "factory": "./src/generators/init/init#expoInitSchematic",
8
+ "schema": "./src/generators/init/schema.json",
9
+ "description": "Initialize the @nrwl/expo plugin",
10
+ "hidden": true
11
+ },
12
+ "application": {
13
+ "factory": "./src/generators/application/application#expoApplicationSchematic",
14
+ "schema": "./src/generators/application/schema.json",
15
+ "aliases": ["app"],
16
+ "x-type": "application",
17
+ "description": "Create an application"
18
+ },
19
+ "library": {
20
+ "factory": "./src/generators/library/library#expoLibrarySchematic",
21
+ "schema": "./src/generators/library/schema.json",
22
+ "aliases": ["lib"],
23
+ "x-type": "library",
24
+ "description": "Create a library"
25
+ },
26
+ "component": {
27
+ "factory": "./src/generators/component/component#expoComponentSchematic",
28
+ "schema": "./src/generators/component/schema.json",
29
+ "description": "Create a component",
30
+ "aliases": ["c"]
31
+ }
32
+ },
33
+ "generators": {
34
+ "init": {
35
+ "factory": "./src/generators/init/init#expoInitGenerator",
36
+ "schema": "./src/generators/init/schema.json",
37
+ "description": "Initialize the @nrwl/expo plugin",
38
+ "hidden": true
39
+ },
40
+ "application": {
41
+ "factory": "./src/generators/application/application#expoApplicationGenerator",
42
+ "schema": "./src/generators/application/schema.json",
43
+ "aliases": ["app"],
44
+ "x-type": "application",
45
+ "description": "Create an application"
46
+ },
47
+ "library": {
48
+ "factory": "./src/generators/library/library#expoLibraryGenerator",
49
+ "schema": "./src/generators/library/schema.json",
50
+ "aliases": ["lib"],
51
+ "x-type": "library",
52
+ "description": "Create a library"
53
+ },
54
+ "component": {
55
+ "factory": "./src/generators/component/component#expoComponentGenerator",
56
+ "schema": "./src/generators/component/schema.json",
57
+ "description": "Create a component",
58
+ "aliases": ["c"]
59
+ }
60
+ }
61
+ }
package/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export { expoInitGenerator } from './src/generators/init/init';
2
+ export { expoApplicationGenerator } from './src/generators/application/application';
3
+ export { withNxMetro } from './plugins/with-nx-metro';
4
+ export { withNxWebpack } from './plugins/with-nx-webpack';
package/index.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.withNxWebpack = exports.withNxMetro = exports.expoApplicationGenerator = exports.expoInitGenerator = void 0;
4
+ var init_1 = require("./src/generators/init/init");
5
+ Object.defineProperty(exports, "expoInitGenerator", { enumerable: true, get: function () { return init_1.expoInitGenerator; } });
6
+ var application_1 = require("./src/generators/application/application");
7
+ Object.defineProperty(exports, "expoApplicationGenerator", { enumerable: true, get: function () { return application_1.expoApplicationGenerator; } });
8
+ var with_nx_metro_1 = require("./plugins/with-nx-metro");
9
+ Object.defineProperty(exports, "withNxMetro", { enumerable: true, get: function () { return with_nx_metro_1.withNxMetro; } });
10
+ var with_nx_webpack_1 = require("./plugins/with-nx-webpack");
11
+ Object.defineProperty(exports, "withNxWebpack", { enumerable: true, get: function () { return with_nx_webpack_1.withNxWebpack; } });
12
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/expo/index.ts"],"names":[],"mappings":";;;AAAA,mDAA+D;AAAtD,yGAAA,iBAAiB,OAAA;AAC1B,wEAAoF;AAA3E,uHAAA,wBAAwB,OAAA;AACjC,yDAAsD;AAA7C,4GAAA,WAAW,OAAA;AACpB,6DAA0D;AAAjD,gHAAA,aAAa,OAAA"}