@nx/expo 24.0.0-beta.2 → 24.0.0-beta.4

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 (72) hide show
  1. package/dist/plugins/plugin.js +8 -4
  2. package/dist/src/executors/install/{install.impl.d.ts → install-packages.d.ts} +0 -4
  3. package/dist/src/executors/install/{install.impl.js → install-packages.js} +0 -17
  4. package/dist/src/executors/update/update.impl.js +2 -2
  5. package/dist/src/generators/application/application.js +2 -3
  6. package/dist/src/generators/application/files/base/package.json.template +1 -0
  7. package/dist/src/generators/application/lib/add-e2e.js +4 -5
  8. package/dist/src/generators/application/lib/add-eas-scripts.d.ts +3 -0
  9. package/dist/src/generators/application/lib/add-eas-scripts.js +103 -3
  10. package/dist/src/generators/application/lib/add-project.js +1 -82
  11. package/dist/src/generators/application/lib/normalize-options.js +0 -4
  12. package/dist/src/generators/application/schema.d.ts +0 -1
  13. package/dist/src/generators/init/init.js +18 -32
  14. package/dist/src/generators/init/schema.d.ts +0 -1
  15. package/dist/src/generators/library/lib/normalize-options.js +0 -5
  16. package/dist/src/generators/library/library.js +2 -3
  17. package/dist/src/generators/library/schema.d.ts +0 -1
  18. package/dist/src/migrations/update-24-0-0/add-eas-build-pre-install.d.ts +2 -0
  19. package/dist/src/migrations/update-24-0-0/add-eas-build-pre-install.js +42 -0
  20. package/dist/src/migrations/update-24-0-0/add-eas-build-pre-install.md +32 -0
  21. package/dist/src/migrations/update-24-0-0/finish-inferred-conversion.md +12 -0
  22. package/dist/src/migrations/update-24-0-0/remove-deprecated-executors.d.ts +6 -0
  23. package/dist/src/migrations/update-24-0-0/remove-deprecated-executors.js +30 -0
  24. package/dist/src/migrations/update-24-0-0/remove-deprecated-executors.md +72 -0
  25. package/dist/src/utils/add-linting.d.ts +0 -1
  26. package/dist/src/utils/add-linting.js +0 -1
  27. package/dist/src/utils/jest/add-jest.d.ts +1 -1
  28. package/dist/src/utils/jest/add-jest.js +1 -2
  29. package/executors.json +0 -40
  30. package/migrations.json +13 -0
  31. package/package.json +10 -10
  32. package/dist/docs/export-examples.md +0 -107
  33. package/dist/docs/prebuild-examples.md +0 -65
  34. package/dist/docs/run-examples.md +0 -86
  35. package/dist/docs/start-examples.md +0 -100
  36. package/dist/src/executors/build/build.impl.d.ts +0 -6
  37. package/dist/src/executors/build/build.impl.js +0 -142
  38. package/dist/src/executors/build/schema.d.ts +0 -18
  39. package/dist/src/executors/build/schema.json +0 -100
  40. package/dist/src/executors/export/export.impl.d.ts +0 -7
  41. package/dist/src/executors/export/export.impl.js +0 -81
  42. package/dist/src/executors/export/schema.d.ts +0 -13
  43. package/dist/src/executors/export/schema.json +0 -50
  44. package/dist/src/executors/install/schema.json +0 -40
  45. package/dist/src/executors/prebuild/prebuild.impl.d.ts +0 -7
  46. package/dist/src/executors/prebuild/prebuild.impl.js +0 -77
  47. package/dist/src/executors/prebuild/schema.d.ts +0 -7
  48. package/dist/src/executors/prebuild/schema.json +0 -37
  49. package/dist/src/executors/run/run.impl.d.ts +0 -6
  50. package/dist/src/executors/run/run.impl.js +0 -102
  51. package/dist/src/executors/run/schema.d.ts +0 -24
  52. package/dist/src/executors/run/schema.json +0 -67
  53. package/dist/src/executors/serve/lib/is-packager-running.d.ts +0 -1
  54. package/dist/src/executors/serve/lib/is-packager-running.js +0 -13
  55. package/dist/src/executors/serve/schema.d.ts +0 -7
  56. package/dist/src/executors/serve/schema.json +0 -37
  57. package/dist/src/executors/serve/serve.impl.d.ts +0 -10
  58. package/dist/src/executors/serve/serve.impl.js +0 -134
  59. package/dist/src/executors/start/schema.d.ts +0 -22
  60. package/dist/src/executors/start/schema.json +0 -95
  61. package/dist/src/executors/start/start.impl.d.ts +0 -7
  62. package/dist/src/executors/start/start.impl.js +0 -84
  63. package/dist/src/executors/submit/schema.d.ts +0 -12
  64. package/dist/src/executors/submit/schema.json +0 -58
  65. package/dist/src/executors/submit/submit.impl.d.ts +0 -6
  66. package/dist/src/executors/submit/submit.impl.js +0 -75
  67. package/dist/src/utils/deprecation.d.ts +0 -3
  68. package/dist/src/utils/deprecation.js +0 -23
  69. package/dist/src/utils/pod-install-task.d.ts +0 -17
  70. package/dist/src/utils/pod-install-task.js +0 -69
  71. package/dist/src/utils/resolve-expo-cli.d.ts +0 -11
  72. package/dist/src/utils/resolve-expo-cli.js +0 -21
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const internal_1 = require("@nx/devkit/internal");
5
+ function update(tree) {
6
+ return (0, internal_1.migrateRemovedExecutors)(tree, [
7
+ '@nx/expo:build',
8
+ '@nx/expo:export',
9
+ '@nx/expo:install',
10
+ '@nx/expo:prebuild',
11
+ '@nx/expo:run',
12
+ '@nx/expo:serve',
13
+ '@nx/expo:start',
14
+ '@nx/expo:submit',
15
+ '@nrwl/expo:build',
16
+ '@nrwl/expo:export',
17
+ '@nrwl/expo:install',
18
+ '@nrwl/expo:prebuild',
19
+ '@nrwl/expo:run',
20
+ '@nrwl/expo:serve',
21
+ '@nrwl/expo:start',
22
+ '@nrwl/expo:submit',
23
+ ], async (tree, options) => {
24
+ const { convertToInferred } = require('../../generators/convert-to-inferred/convert-to-inferred');
25
+ // The callback only prints the options the converter could not carry
26
+ // over; migrateRemovedExecutors discards it.
27
+ const flushLogs = await convertToInferred(tree, options);
28
+ flushLogs();
29
+ });
30
+ }
@@ -0,0 +1,72 @@
1
+ #### Convert `@nx/expo` targets to inferred tasks
2
+
3
+ Nx 24 removes the `@nx/expo:build`, `@nx/expo:export`, `@nx/expo:install`, `@nx/expo:prebuild`, `@nx/expo:run`, `@nx/expo:serve`, `@nx/expo:start` and `@nx/expo:submit` executors and their `@nrwl` aliases. The migration registers `@nx/expo/plugin` in `nx.json` and converts the targets that use those executors to inferred tasks. Executor options become command-line arguments of the inferred tasks. A target with nothing left to override is removed from project configuration. When several projects share the same remaining options, those options move to a `targetDefaults` entry scoped to the plugin. `targetDefaults` entries keyed by a removed executor are removed once no target uses that executor.
4
+
5
+ The migration lists the targets the converter cannot convert safely. In agentic runs, an AI prompt finishes them and validates the project graph.
6
+
7
+ The `@nx/expo:build-list`, `@nx/expo:sync-deps`, `@nx/expo:update` and `@nx/expo:ensure-symlink` executors stay.
8
+
9
+ The inferred `install` and `prebuild` tasks run `expo install` and `expo prebuild` as they are. `@nx/expo:install` installed packages into the root `package.json` and then synced them into the app's. The inferred `install` runs in the app directory, so packages go into the app's `package.json` and no longer into the root one. To keep dependencies in the root `package.json`, install them there and sync them with the kept `@nx/expo:sync-deps` executor. `@nx/expo:prebuild` ran `expo prebuild --no-install` and then installed packages and CocoaPods itself, which `expo prebuild` does by default.
10
+
11
+ `@nx/expo:build` copied the root dependencies and lock file into the app before `eas build`. The `add-eas-build-pre-install` migration moves that step to an `eas-build-pre-install` script that EAS Build runs.
12
+
13
+ #### Sample code changes
14
+
15
+ The `install` target has no options that differ from the inferred target, so it is removed. The `export` options become CLI arguments.
16
+
17
+ ##### Before
18
+
19
+ ```json title="apps/demo/project.json"
20
+ {
21
+ "name": "demo",
22
+ "targets": {
23
+ "export": {
24
+ "executor": "@nx/expo:export",
25
+ "options": {
26
+ "platform": "all",
27
+ "outputDir": "dist/demo"
28
+ }
29
+ },
30
+ "install": {
31
+ "executor": "@nx/expo:install",
32
+ "options": {}
33
+ }
34
+ }
35
+ }
36
+ ```
37
+
38
+ ##### After
39
+
40
+ ```json title="apps/demo/project.json"
41
+ {
42
+ "name": "demo",
43
+ "targets": {
44
+ "export": {
45
+ "options": {
46
+ "args": ["--output-dir=../../dist/demo", "--platform=all"]
47
+ }
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
53
+ ```json title="nx.json"
54
+ {
55
+ "plugins": [
56
+ {
57
+ "plugin": "@nx/expo/plugin",
58
+ "options": {
59
+ "buildTargetName": "build",
60
+ "exportTargetName": "export",
61
+ "installTargetName": "install",
62
+ "prebuildTargetName": "prebuild",
63
+ "runAndroidTargetName": "run-android",
64
+ "runIosTargetName": "run-ios",
65
+ "serveTargetName": "serve",
66
+ "startTargetName": "start",
67
+ "submitTargetName": "submit"
68
+ }
69
+ }
70
+ ]
71
+ }
72
+ ```
@@ -12,7 +12,6 @@ interface NormalizedSchema {
12
12
  tsConfigPaths: string[];
13
13
  unitTestRunner?: string;
14
14
  skipPackageJson?: boolean;
15
- addPlugin?: boolean;
16
15
  buildable?: boolean;
17
16
  isTsSolutionSetup?: boolean;
18
17
  }
@@ -15,7 +15,6 @@ async function addLinting(host, options) {
15
15
  unitTestRunner: options.unitTestRunner,
16
16
  skipPackageJson: options.skipPackageJson,
17
17
  enableTypedLinting: (0, internal_1.isTypedLintingEnabled)(options),
18
- addPlugin: options.addPlugin,
19
18
  addPackageJsonDependencyChecks: options.buildable,
20
19
  }));
21
20
  // Everything below configures ESLint — predefined configs, `extends`, ignore
@@ -1,2 +1,2 @@
1
1
  import { Tree, type GeneratorCallback } from '@nx/devkit';
2
- export declare function addJest(host: Tree, unitTestRunner: 'jest' | 'none', projectName: string, appProjectRoot: string, js: boolean, skipPackageJson: boolean, addPlugin: boolean): Promise<GeneratorCallback>;
2
+ export declare function addJest(host: Tree, unitTestRunner: 'jest' | 'none', projectName: string, appProjectRoot: string, js: boolean, skipPackageJson: boolean): Promise<GeneratorCallback>;
@@ -6,7 +6,7 @@ const path_1 = require("path");
6
6
  const update_tsconfig_files_1 = require("../update-tsconfig-files");
7
7
  const versions_1 = require("../versions");
8
8
  const version_utils_1 = require("../version-utils");
9
- async function addJest(host, unitTestRunner, projectName, appProjectRoot, js, skipPackageJson, addPlugin) {
9
+ async function addJest(host, unitTestRunner, projectName, appProjectRoot, js, skipPackageJson) {
10
10
  if (unitTestRunner !== 'jest') {
11
11
  return () => { };
12
12
  }
@@ -20,7 +20,6 @@ async function addJest(host, unitTestRunner, projectName, appProjectRoot, js, sk
20
20
  compiler: 'babel',
21
21
  skipPackageJson,
22
22
  skipFormat: true,
23
- addPlugin,
24
23
  });
25
24
  // Expo SDK 54+ (including 55) use the winter-runtime ImportMetaRegistry mock;
26
25
  // only SDK 53 needs the custom Jest resolver.
package/executors.json CHANGED
@@ -5,26 +5,11 @@
5
5
  "schema": "./dist/src/executors/update/schema.json",
6
6
  "description": "Start an EAS update for your expo project"
7
7
  },
8
- "build": {
9
- "implementation": "./dist/src/executors/build/build.impl",
10
- "schema": "./dist/src/executors/build/schema.json",
11
- "description": "Start an EAS build for your expo project"
12
- },
13
8
  "build-list": {
14
9
  "implementation": "./dist/src/executors/build-list/build-list.impl",
15
10
  "schema": "./dist/src/executors/build-list/schema.json",
16
11
  "description": "List all EAS builds for your Expo project"
17
12
  },
18
- "run": {
19
- "implementation": "./dist/src/executors/run/run.impl",
20
- "schema": "./dist/src/executors/run/schema.json",
21
- "description": "Run the Android app binary locally or run the iOS app binary locally"
22
- },
23
- "start": {
24
- "implementation": "./dist/src/executors/start/start.impl",
25
- "schema": "./dist/src/executors/start/schema.json",
26
- "description": "Start a local dev server for the app or start a Webpack dev server for the web app"
27
- },
28
13
  "sync-deps": {
29
14
  "implementation": "./dist/src/executors/sync-deps/sync-deps.impl",
30
15
  "schema": "./dist/src/executors/sync-deps/schema.json",
@@ -34,31 +19,6 @@
34
19
  "implementation": "./dist/src/executors/ensure-symlink/ensure-symlink.impl",
35
20
  "schema": "./dist/src/executors/ensure-symlink/schema.json",
36
21
  "description": "Ensure workspace node_modules is symlink under app's node_modules folder."
37
- },
38
- "prebuild": {
39
- "implementation": "./dist/src/executors/prebuild/prebuild.impl",
40
- "schema": "./dist/src/executors/prebuild/schema.json",
41
- "description": "Create native iOS and Android project files for building natively."
42
- },
43
- "install": {
44
- "implementation": "./dist/src/executors/install/install.impl",
45
- "schema": "./dist/src/executors/install/schema.json",
46
- "description": "Install a module or other package to a project."
47
- },
48
- "export": {
49
- "implementation": "./dist/src/executors/export/export.impl",
50
- "schema": "./dist/src/executors/export/schema.json",
51
- "description": "Export the JavaScript and assets for your app using Metro/webpack bundler"
52
- },
53
- "submit": {
54
- "implementation": "./dist/src/executors/submit/submit.impl",
55
- "schema": "./dist/src/executors/submit/schema.json",
56
- "description": "Submit app binary to App Store and/or Play Store"
57
- },
58
- "serve": {
59
- "implementation": "./dist/src/executors/serve/serve.impl",
60
- "schema": "./dist/src/executors/serve/schema.json",
61
- "description": "Serve up the Expo web app locally"
62
22
  }
63
23
  }
64
24
  }
package/migrations.json CHANGED
@@ -84,6 +84,19 @@
84
84
  },
85
85
  "description": "Update Jest test-setup for the Expo SDK 56 winter runtime",
86
86
  "factory": "./dist/src/migrations/update-23-1-0/update-jest-winter-runtime-for-expo-56"
87
+ },
88
+ "remove-deprecated-executors": {
89
+ "version": "24.0.0-beta.3",
90
+ "description": "Converts targets using the removed `@nx/expo` executors to inferred tasks; an AI prompt finishes the targets the converter cannot convert safely and validates the project graph.",
91
+ "implementation": "./dist/src/migrations/update-24-0-0/remove-deprecated-executors",
92
+ "prompt": "./dist/src/migrations/update-24-0-0/finish-inferred-conversion.md",
93
+ "documentation": "./dist/src/migrations/update-24-0-0/remove-deprecated-executors.md"
94
+ },
95
+ "add-eas-build-pre-install": {
96
+ "version": "24.0.0-beta.3",
97
+ "description": "Adds an `eas-build-pre-install` script to Expo apps with an `eas.json`, which copies the root dependencies and lock file into the app on EAS Build as the removed `@nx/expo:build` executor did locally.",
98
+ "implementation": "./dist/src/migrations/update-24-0-0/add-eas-build-pre-install",
99
+ "documentation": "./dist/src/migrations/update-24-0-0/add-eas-build-pre-install.md"
87
100
  }
88
101
  },
89
102
  "packageJsonUpdates": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/expo",
3
- "version": "24.0.0-beta.2",
3
+ "version": "24.0.0-beta.4",
4
4
  "private": false,
5
5
  "description": "The Expo Plugin for Nx contains executors and generators for managing and developing an expo application within your workspace. For example, you can directly build for different target platforms as well as generate projects and publish your code.",
6
6
  "keywords": [
@@ -56,10 +56,10 @@
56
56
  }
57
57
  },
58
58
  "dependencies": {
59
- "@nx/devkit": "24.0.0-beta.2",
60
- "@nx/eslint": "24.0.0-beta.2",
61
- "@nx/js": "24.0.0-beta.2",
62
- "@nx/react": "24.0.0-beta.2",
59
+ "@nx/devkit": "24.0.0-beta.4",
60
+ "@nx/eslint": "24.0.0-beta.4",
61
+ "@nx/js": "24.0.0-beta.4",
62
+ "@nx/react": "24.0.0-beta.4",
63
63
  "enhanced-resolve": "^5.8.3",
64
64
  "picocolors": "^1.1.0",
65
65
  "semver": "^7.6.3",
@@ -67,8 +67,8 @@
67
67
  "tslib": "^2.3.0"
68
68
  },
69
69
  "peerDependencies": {
70
- "@nx/cypress": "24.0.0-beta.2",
71
- "@nx/playwright": "24.0.0-beta.2",
70
+ "@nx/cypress": "24.0.0-beta.4",
71
+ "@nx/playwright": "24.0.0-beta.4",
72
72
  "expo": ">=53.0.0",
73
73
  "@expo/metro": ">= 55.0.0",
74
74
  "metro-config": ">= 0.82.0",
@@ -95,11 +95,11 @@
95
95
  }
96
96
  },
97
97
  "devDependencies": {
98
- "nx": "24.0.0-beta.2"
98
+ "nx": "24.0.0-beta.4"
99
99
  },
100
100
  "optionalDependencies": {
101
- "@nx/detox": "24.0.0-beta.2",
102
- "@nx/rollup": "24.0.0-beta.2"
101
+ "@nx/detox": "24.0.0-beta.4",
102
+ "@nx/rollup": "24.0.0-beta.4"
103
103
  },
104
104
  "executors": "./executors.json",
105
105
  "ng-update": {
@@ -1,107 +0,0 @@
1
- `project.json`:
2
-
3
- ```json
4
- {
5
- "name": "mobile",
6
- //...
7
- "targets": {
8
- //...
9
- "export": {
10
- "executor": "@nx/expo:export",
11
- "options": {
12
- "outputs": ["{options.outputDir}"],
13
- "platform": "all",
14
- "outputDir": "dist/apps/mobile"
15
- },
16
- "dependsOn": ["sync-deps"]
17
- }
18
- //...
19
- }
20
- }
21
- ```
22
-
23
- ```shell
24
- nx run mobile:export
25
- ```
26
-
27
- ## Examples
28
-
29
- ##### Specify outputDir
30
-
31
- The `outputDir` option allows you to specify the output directory of your bundle:
32
-
33
- ```json
34
- "export": {
35
- "executor": "@nx/expo:export",
36
- "outputs": ["{options.outputDir}"],
37
- "options": {
38
- "platform": "all",
39
- "bundler": "metro",
40
- "outputDir": "dist/apps/mobile"
41
- },
42
- "dependsOn": ["sync-deps"]
43
- },
44
- ```
45
-
46
- or run command: `nx run mobile:export --outputDir=dist/apps/mobile`.
47
-
48
- ##### Specify the platform
49
-
50
- The `platform` option allows you to specify the platform to compile with metro bundler: "ios", "android", "all", and "web".
51
-
52
- For example, to bundle for web:
53
-
54
- ```json
55
- "export": {
56
- "executor": "@nx/expo:export",
57
- "outputs": ["{options.outputDir}"],
58
- "options": {
59
- "platform": "web",
60
- "bundler": "metro",
61
- "outputDir": "dist/apps/dogs"
62
- },
63
- "dependsOn": ["sync-deps"]
64
- },
65
- ```
66
-
67
- or run command `nx export mobile --platform=web`.
68
-
69
- ##### Bundle for development
70
-
71
- The `dev` option allows you to bundle for development environments.
72
-
73
- ```json
74
- "export": {
75
- "executor": "@nx/expo:export",
76
- "outputs": ["{options.outputDir}"],
77
- "options": {
78
- "platform": "web",
79
- "bundler": "metro",
80
- "outputDir": "dist/apps/dogs",
81
- "dev": true
82
- },
83
- "dependsOn": ["sync-deps"]
84
- },
85
- ```
86
-
87
- or run command `nx export mobile --dev`.
88
-
89
- ##### Clear bundle cache
90
-
91
- The `clear` option allows you to clear bundle cache.
92
-
93
- ```json
94
- "export": {
95
- "executor": "@nx/expo:export",
96
- "outputs": ["{options.outputDir}"],
97
- "options": {
98
- "platform": "web",
99
- "bundler": "metro",
100
- "outputDir": "dist/apps/dogs",
101
- "clear": true
102
- },
103
- "dependsOn": ["sync-deps"]
104
- },
105
- ```
106
-
107
- or run command `nx export mobile --clear`.
@@ -1,65 +0,0 @@
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": "@nx/expo:prebuild",
13
- "options": {}
14
- }
15
- //...
16
- }
17
- }
18
- ```
19
-
20
- ```shell
21
- nx run mobile:prebuild
22
- ```
23
-
24
- ## Examples
25
-
26
- ##### Generate Native Code for Different Platforms
27
-
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": "@nx/expo:prebuild",
33
- "options": {
34
- "platform": "android"
35
- }
36
- }
37
- ```
38
-
39
- ##### Regenerate Native Code
40
-
41
- The `clean` option allows you to delete the native folders and regenerate them before apply changes.
42
-
43
- ```json
44
- "prebuild": {
45
- "executor": "@nx/expo:prebuild",
46
- "options": {
47
- "clean": true
48
- }
49
- }
50
- ```
51
-
52
- ##### Install NPM Packages and CocoaPods
53
-
54
- The `install` option allows you to install NPM Packages and CocoaPods.
55
-
56
- ```json
57
- "prebuild": {
58
- "executor": "@nx/expo:prebuild",
59
- "options": {
60
- "install": true
61
- }
62
- }
63
- ```
64
-
65
- ---
@@ -1,86 +0,0 @@
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": "@nx/expo:run",
13
- "options": {
14
- "platform": "ios"
15
- }
16
- },
17
- "run-android": {
18
- "executor": "@nx/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
- ##### Compile Android with Different Variants
36
-
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": "@nx/expo:run",
42
- "options": {
43
- "platform": "android",
44
- "variant": "release"
45
- }
46
- }
47
- ```
48
-
49
- ##### Compile iOS with Different Configurations
50
-
51
- The `xcodeConfiguration` option allows you to specify Xcode configuration to use (e.g. Debug or Release).
52
-
53
- ```json
54
- "run-ios": {
55
- "executor": "@nx/expo:run",
56
- "options": {
57
- "platform": "ios",
58
- "xcodeConfiguration": "Release"
59
- }
60
- }
61
- ```
62
-
63
- ##### Run on a device
64
-
65
- The `device` option allows you to launch your app in a specific device name or UDID.
66
- To see all your iOS simulators: run `xcrun simctl list devices available`.
67
- To see all your Android emulators, run: `emulator -list-avds`.
68
-
69
- ```json
70
- "run-ios": {
71
- "executor": "@nx/expo:run",
72
- "options": {
73
- "platform": "ios",
74
- "device": "iPhone 14"
75
- }
76
- },
77
- "run-android": {
78
- "executor": "@nx/expo:run",
79
- "options": {
80
- "platform": "android",
81
- "device": "Pixel_XL_API_Tiramisu"
82
- }
83
- }
84
- ```
85
-
86
- ---
@@ -1,100 +0,0 @@
1
- `project.json`:
2
-
3
- ```json
4
- {
5
- "name": "mobile",
6
- //...
7
- "targets": {
8
- //...
9
- "start": {
10
- "executor": "@nx/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
- ##### Specify starting on platform
27
-
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": "@nx/expo:start",
35
- "options": {
36
- "port": 8081,
37
- "ios": true
38
- }
39
- }
40
- ```
41
-
42
- or run command `nx start <your app name> --ios`.
43
-
44
- Opens your app in Expo Go on a connected Android device
45
-
46
- ```json
47
- "start": {
48
- "executor": "@nx/expo:start",
49
- "options": {
50
- "port": 8081,
51
- "android": true
52
- }
53
- }
54
- ```
55
-
56
- or run command `nx start <your app name> --android`.
57
-
58
- Opens your app in a web browser:
59
-
60
- ```json
61
- "start": {
62
- "executor": "@nx/expo:start",
63
- "options": {
64
- "port": 8081,
65
- "web": true
66
- }
67
- }
68
- ```
69
-
70
- or run command `nx start <your app name> --web`.
71
-
72
- ##### Specify the host
73
-
74
- 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.
75
-
76
- ```json
77
- "start": {
78
- "executor": "@nx/expo:start",
79
- "options": {
80
- "port": 8081,
81
- "host": "localhost"
82
- }
83
- }
84
- ```
85
-
86
- ##### Starts the server with cache reset
87
-
88
- The `clear` option allows you to remove Metro bundler cache.
89
-
90
- ```json
91
- "start": {
92
- "executor": "@nx/expo:start",
93
- "options": {
94
- "port": 8081,
95
- "clear": true
96
- }
97
- }
98
- ```
99
-
100
- ---
@@ -1,6 +0,0 @@
1
- import { ExecutorContext } from '@nx/devkit';
2
- import { ExpoEasBuildOptions } from './schema';
3
- export interface ReactNativeBuildOutput {
4
- success: boolean;
5
- }
6
- export default function buildExecutor(options: ExpoEasBuildOptions, context: ExecutorContext): AsyncGenerator<ReactNativeBuildOutput>;