@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.
- package/.eslintrc.json +19 -0
- package/CHANGELOG.md +8 -0
- package/LICENSE +22 -0
- package/README.md +63 -0
- package/collection.json +0 -0
- package/docs/build-list-examples.md +71 -0
- package/docs/prebuild-examples.md +70 -0
- package/docs/run-examples.md +91 -0
- package/docs/start-examples.md +98 -0
- package/executors.json +116 -0
- package/generators.json +61 -0
- package/index.d.ts +4 -0
- package/index.js +12 -0
- package/index.js.map +1 -0
- package/migrations.json +734 -0
- package/package.json +59 -0
- package/plugins/jest/svg-mock.d.ts +0 -0
- package/plugins/jest/svg-mock.js +4 -0
- package/plugins/jest/svg-mock.js.map +1 -0
- package/plugins/metro-resolver.d.ts +1 -0
- package/plugins/metro-resolver.js +135 -0
- package/plugins/metro-resolver.js.map +1 -0
- package/plugins/with-nx-metro.d.ts +8 -0
- package/plugins/with-nx-metro.js +31 -0
- package/plugins/with-nx-metro.js.map +1 -0
- package/plugins/with-nx-webpack.d.ts +5 -0
- package/plugins/with-nx-webpack.js +52 -0
- package/plugins/with-nx-webpack.js.map +1 -0
- package/project.json +61 -0
- package/src/executors/build/build.impl.d.ts +6 -0
- package/src/executors/build/build.impl.js +62 -0
- package/src/executors/build/build.impl.js.map +1 -0
- package/src/executors/build/compat.d.ts +2 -0
- package/src/executors/build/compat.js +6 -0
- package/src/executors/build/compat.js.map +1 -0
- package/src/executors/build/schema.d.ts +14 -0
- package/src/executors/build/schema.json +60 -0
- package/src/executors/build-list/build-fragment.d.ts +54 -0
- package/src/executors/build-list/build-list.impl.d.ts +7 -0
- package/src/executors/build-list/build-list.impl.js +86 -0
- package/src/executors/build-list/build-list.impl.js.map +1 -0
- package/src/executors/build-list/compat.d.ts +2 -0
- package/src/executors/build-list/compat.js +6 -0
- package/src/executors/build-list/compat.js.map +1 -0
- package/src/executors/build-list/schema.d.ts +25 -0
- package/src/executors/build-list/schema.json +79 -0
- package/src/executors/download/compat.d.ts +2 -0
- package/src/executors/download/compat.js +6 -0
- package/src/executors/download/compat.js.map +1 -0
- package/src/executors/download/download.impl.d.ts +15 -0
- package/src/executors/download/download.impl.js +101 -0
- package/src/executors/download/download.impl.js.map +1 -0
- package/src/executors/download/schema.d.ts +3 -0
- package/src/executors/download/schema.json +59 -0
- package/src/executors/ensure-symlink/compat.d.ts +2 -0
- package/src/executors/ensure-symlink/compat.js +6 -0
- package/src/executors/ensure-symlink/compat.js.map +1 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +5 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.js +13 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +1 -0
- package/src/executors/ensure-symlink/schema.json +11 -0
- package/src/executors/export/compat.d.ts +2 -0
- package/src/executors/export/compat.js +6 -0
- package/src/executors/export/compat.js.map +1 -0
- package/src/executors/export/export.impl.d.ts +6 -0
- package/src/executors/export/export.impl.js +69 -0
- package/src/executors/export/export.impl.js.map +1 -0
- package/src/executors/export/schema.d.ts +11 -0
- package/src/executors/export/schema.json +48 -0
- package/src/executors/install/compat.d.ts +2 -0
- package/src/executors/install/compat.js +6 -0
- package/src/executors/install/compat.js.map +1 -0
- package/src/executors/install/install.impl.d.ts +7 -0
- package/src/executors/install/install.impl.js +70 -0
- package/src/executors/install/install.impl.js.map +1 -0
- package/src/executors/install/schema.d.ts +7 -0
- package/src/executors/install/schema.json +34 -0
- package/src/executors/prebuild/compat.d.ts +2 -0
- package/src/executors/prebuild/compat.js +6 -0
- package/src/executors/prebuild/compat.js.map +1 -0
- package/src/executors/prebuild/prebuild.impl.d.ts +7 -0
- package/src/executors/prebuild/prebuild.impl.js +70 -0
- package/src/executors/prebuild/prebuild.impl.js.map +1 -0
- package/src/executors/prebuild/schema.d.ts +7 -0
- package/src/executors/prebuild/schema.json +35 -0
- package/src/executors/run/compat.d.ts +2 -0
- package/src/executors/run/compat.js +6 -0
- package/src/executors/run/compat.js.map +1 -0
- package/src/executors/run/run.impl.d.ts +6 -0
- package/src/executors/run/run.impl.js +112 -0
- package/src/executors/run/run.impl.js.map +1 -0
- package/src/executors/run/schema.d.ts +25 -0
- package/src/executors/run/schema.json +71 -0
- package/src/executors/start/compat.d.ts +2 -0
- package/src/executors/start/compat.js +6 -0
- package/src/executors/start/compat.js.map +1 -0
- package/src/executors/start/schema.d.ts +22 -0
- package/src/executors/start/schema.json +93 -0
- package/src/executors/start/start.impl.d.ts +7 -0
- package/src/executors/start/start.impl.js +73 -0
- package/src/executors/start/start.impl.js.map +1 -0
- package/src/executors/sync-deps/compat.d.ts +2 -0
- package/src/executors/sync-deps/compat.js +6 -0
- package/src/executors/sync-deps/compat.js.map +1 -0
- package/src/executors/sync-deps/schema.d.ts +4 -0
- package/src/executors/sync-deps/schema.json +28 -0
- package/src/executors/sync-deps/sync-deps.impl.d.ts +8 -0
- package/src/executors/sync-deps/sync-deps.impl.js +62 -0
- package/src/executors/sync-deps/sync-deps.impl.js.map +1 -0
- package/src/executors/update/compat.d.ts +2 -0
- package/src/executors/update/compat.js +6 -0
- package/src/executors/update/compat.js.map +1 -0
- package/src/executors/update/schema.d.ts +15 -0
- package/src/executors/update/schema.json +65 -0
- package/src/executors/update/update.impl.d.ts +6 -0
- package/src/executors/update/update.impl.js +59 -0
- package/src/executors/update/update.impl.js.map +1 -0
- package/src/generators/application/application.d.ts +5 -0
- package/src/generators/application/application.js +33 -0
- package/src/generators/application/application.js.map +1 -0
- package/src/generators/application/files/app.json.template +33 -0
- package/src/generators/application/files/assets/adaptive-icon.png +0 -0
- package/src/generators/application/files/assets/favicon.png +0 -0
- package/src/generators/application/files/assets/icon.png +0 -0
- package/src/generators/application/files/assets/splash.png +0 -0
- package/src/generators/application/files/babel.config.js.template +6 -0
- package/src/generators/application/files/eas.json.template +28 -0
- package/src/generators/application/files/index.js.template +8 -0
- package/src/generators/application/files/metro.config.js.template +25 -0
- package/src/generators/application/files/package.json.template +17 -0
- package/src/generators/application/files/src/app/App.spec.tsx.template +9 -0
- package/src/generators/application/files/src/app/App.tsx.template +694 -0
- package/src/generators/application/files/test-setup.ts.template +1 -0
- package/src/generators/application/files/tsconfig.app.json.template +9 -0
- package/src/generators/application/files/tsconfig.json.template +26 -0
- package/src/generators/application/lib/add-detox.d.ts +3 -0
- package/src/generators/application/lib/add-detox.js +16 -0
- package/src/generators/application/lib/add-detox.js.map +1 -0
- package/src/generators/application/lib/add-project.d.ts +3 -0
- package/src/generators/application/lib/add-project.js +91 -0
- package/src/generators/application/lib/add-project.js.map +1 -0
- package/src/generators/application/lib/create-application-files.d.ts +3 -0
- package/src/generators/application/lib/create-application-files.js +24 -0
- package/src/generators/application/lib/create-application-files.js.map +1 -0
- package/src/generators/application/lib/normalize-options.d.ts +10 -0
- package/src/generators/application/lib/normalize-options.js +30 -0
- package/src/generators/application/lib/normalize-options.js.map +1 -0
- package/src/generators/application/schema.d.ts +19 -0
- package/src/generators/application/schema.json +88 -0
- package/src/generators/component/component.d.ts +5 -0
- package/src/generators/component/component.js +51 -0
- package/src/generators/component/component.js.map +1 -0
- package/src/generators/component/files/__fileName__.spec.tsx.template +11 -0
- package/src/generators/component/files/__fileName__.tsx.template +32 -0
- package/src/generators/component/lib/add-import.d.ts +3 -0
- package/src/generators/component/lib/add-import.js +30 -0
- package/src/generators/component/lib/add-import.js.map +1 -0
- package/src/generators/component/lib/normalize-options.d.ts +8 -0
- package/src/generators/component/lib/normalize-options.js +58 -0
- package/src/generators/component/lib/normalize-options.js.map +1 -0
- package/src/generators/component/schema.d.ts +15 -0
- package/src/generators/component/schema.json +83 -0
- package/src/generators/init/init.d.ts +6 -0
- package/src/generators/init/init.js +69 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/lib/add-git-ignore-entry.d.ts +2 -0
- package/src/generators/init/lib/add-git-ignore-entry.js +19 -0
- package/src/generators/init/lib/add-git-ignore-entry.js.map +1 -0
- package/src/generators/init/lib/gitignore-entries.d.ts +1 -0
- package/src/generators/init/lib/gitignore-entries.js +20 -0
- package/src/generators/init/lib/gitignore-entries.js.map +1 -0
- package/src/generators/init/lib/init-root-babel-config.d.ts +2 -0
- package/src/generators/init/lib/init-root-babel-config.js +14 -0
- package/src/generators/init/lib/init-root-babel-config.js.map +1 -0
- package/src/generators/init/schema.d.ts +7 -0
- package/src/generators/init/schema.json +38 -0
- package/src/generators/library/files/lib/README.md +7 -0
- package/src/generators/library/files/lib/babel.config.json +17 -0
- package/src/generators/library/files/lib/package.json.template +5 -0
- package/src/generators/library/files/lib/src/index.ts.template +0 -0
- package/src/generators/library/files/lib/test-setup.ts.template +1 -0
- package/src/generators/library/files/lib/tsconfig.json.template +16 -0
- package/src/generators/library/files/lib/tsconfig.lib.json.template +9 -0
- package/src/generators/library/lib/normalize-options.d.ts +12 -0
- package/src/generators/library/lib/normalize-options.js +27 -0
- package/src/generators/library/lib/normalize-options.js.map +1 -0
- package/src/generators/library/library.d.ts +5 -0
- package/src/generators/library/library.js +101 -0
- package/src/generators/library/library.js.map +1 -0
- package/src/generators/library/schema.d.ts +22 -0
- package/src/generators/library/schema.json +99 -0
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.d.ts +6 -0
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +35 -0
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js.map +1 -0
- package/src/migrations/update-14-1-2/add-eject-target-14-1-2.d.ts +5 -0
- package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js +25 -0
- package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js.map +1 -0
- package/src/migrations/update-14-4-3/add-eas-build-target.d.ts +5 -0
- package/src/migrations/update-14-4-3/add-eas-build-target.js +42 -0
- package/src/migrations/update-14-4-3/add-eas-build-target.js.map +1 -0
- package/src/migrations/update-14-5-1/add-eas-update-target.d.ts +5 -0
- package/src/migrations/update-14-5-1/add-eas-update-target.js +27 -0
- package/src/migrations/update-14-5-1/add-eas-update-target.js.map +1 -0
- package/src/migrations/update-15-0-3/add-new-expo-cli-targets.d.ts +9 -0
- package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js +66 -0
- package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js.map +1 -0
- package/src/migrations/update-15-0-3/change-jest-preset.d.ts +8 -0
- package/src/migrations/update-15-0-3/change-jest-preset.js +74 -0
- package/src/migrations/update-15-0-3/change-jest-preset.js.map +1 -0
- package/src/migrations/update-15-8-3/change-webpack-to-metro.d.ts +8 -0
- package/src/migrations/update-15-8-3/change-webpack-to-metro.js +37 -0
- package/src/migrations/update-15-8-3/change-webpack-to-metro.js.map +1 -0
- package/src/migrations/update-16-0-0/remove-deprecated-targets.d.ts +5 -0
- package/src/migrations/update-16-0-0/remove-deprecated-targets.js +36 -0
- package/src/migrations/update-16-0-0/remove-deprecated-targets.js.map +1 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
- package/src/utils/add-jest.d.ts +2 -0
- package/src/utils/add-jest.js +39 -0
- package/src/utils/add-jest.js.map +1 -0
- package/src/utils/add-linting.d.ts +3 -0
- package/src/utils/add-linting.js +37 -0
- package/src/utils/add-linting.js.map +1 -0
- package/src/utils/ensure-node-modules-symlink.d.ts +9 -0
- package/src/utils/ensure-node-modules-symlink.js +29 -0
- package/src/utils/ensure-node-modules-symlink.js.map +1 -0
- package/src/utils/find-all-npm-dependencies.d.ts +2 -0
- package/src/utils/find-all-npm-dependencies.js +26 -0
- package/src/utils/find-all-npm-dependencies.js.map +1 -0
- package/src/utils/pod-install-task.d.ts +8 -0
- package/src/utils/pod-install-task.js +53 -0
- package/src/utils/pod-install-task.js.map +1 -0
- package/src/utils/symlink-task.d.ts +2 -0
- package/src/utils/symlink-task.js +19 -0
- package/src/utils/symlink-task.js.map +1 -0
- package/src/utils/versions.d.ts +20 -0
- package/src/utils/versions.js +24 -0
- package/src/utils/versions.js.map +1 -0
- package/tsconfig.json +13 -0
- package/tsconfig.lib.json +11 -0
- package/tsconfig.spec.json +20 -0
- 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
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
|
+
[](https://circleci.com/gh/nrwl/nx)
|
|
6
|
+
[]()
|
|
7
|
+
[](https://www.npmjs.com/@nrwl/workspace)
|
|
8
|
+
[]()
|
|
9
|
+
[](http://commitizen.github.io/cz-cli/)
|
|
10
|
+
[](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
11
|
+
[](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
|
+
|
package/collection.json
ADDED
|
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
|
+
}
|
package/generators.json
ADDED
|
@@ -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
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"}
|