Nicholas Cunningham f9d461e663
feat(react-native): update executor and schema files for expo and react-native to be continuous (#30985)
WIP

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-05-01 18:47:35 -04:00

77 lines
4.3 KiB
JSON

{
"name": "run",
"implementation": "/packages/expo/src/executors/run/run.impl.ts",
"schema": {
"version": 2,
"continuous": true,
"outputCapture": "direct-nodejs",
"cli": "nx",
"$id": "NxExpoRun",
"$schema": "https://json-schema.org/schema",
"title": "Run iOS or Android application",
"description": "Run Expo target options.",
"type": "object",
"properties": {
"platform": {
"description": "Platform to run for (ios, android).",
"enum": ["ios", "android"],
"default": "ios",
"alias": "p"
},
"xcodeConfiguration": {
"type": "string",
"description": "(iOS) Xcode configuration to use. Debug or Release",
"default": "Debug",
"x-priority": "important"
},
"scheme": {
"type": "string",
"description": "(iOS) Explicitly set the Xcode scheme to use"
},
"variant": {
"type": "string",
"description": "(Android) Specify your app's build variant (e.g. debug, release).",
"default": "debug",
"x-priority": "important"
},
"device": {
"type": "string",
"description": "Device name or UDID to build the app on. The value is not required if you have a single device connected.",
"alias": "d"
},
"port": {
"type": "number",
"description": "Port to start the Metro bundler on",
"default": 8081,
"alias": "p"
},
"bundler": {
"type": "boolean",
"description": "Whether to skip starting the Metro bundler. True to start it, false to skip it."
},
"install": {
"type": "boolean",
"description": "Installing npm packages and CocoaPods before building.",
"default": true
},
"buildCache": {
"type": "boolean",
"description": "Should use derived data for builds."
},
"clean": {
"type": "boolean",
"description": "Delete the native folders and regenerate them before applying changes",
"default": false
}
},
"required": ["platform"],
"examplesFile": "The `run` command allows you to compile your app locally.\n\n`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"run-ios\": {\n \"executor\": \"@nx/expo:run\",\n \"options\": {\n \"platform\": \"ios\"\n }\n },\n \"run-android\": {\n \"executor\": \"@nx/expo:run\",\n \"options\": {\n \"platform\": \"android\"\n }\n }\n //...\n }\n}\n```\n\n```shell\nnx run mobile:run-ios\nnx run mobile:run-android\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Compile Android with Different Variants\" %}\nThe `variant` option allows you to specify the compile Android app with variants defined in `build.gradle` file (e.g. debug, release).\n\n```json\n \"run-android\": {\n \"executor\": \"@nx/expo:run\",\n \"options\": {\n \"platform\": \"android\",\n \"variant\": \"release\"\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Compile iOS with Different Configurations\" %}\n\nThe `xcodeConfiguration` option allows you to specify Xcode configuration to use (e.g. Debug or Release).\n\n```json\n \"run-ios\": {\n \"executor\": \"@nx/expo:run\",\n \"options\": {\n \"platform\": \"ios\",\n \"xcodeConfiguration\": \"Release\"\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Run on a device\" %}\n\nThe `device` option allows you to launch your app in a specific device name or UDID.\nTo see all your iOS simulators: run `xcrun simctl list devices available`.\nTo see all your Android emulators, run: `emulator -list-avds`.\n\n```json\n \"run-ios\": {\n \"executor\": \"@nx/expo:run\",\n \"options\": {\n \"platform\": \"ios\",\n \"device\": \"iPhone 14\"\n }\n },\n \"run-android\": {\n \"executor\": \"@nx/expo:run\",\n \"options\": {\n \"platform\": \"android\",\n \"device\": \"Pixel_XL_API_Tiramisu\"\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n",
"presets": []
},
"description": "Run the Android app binary locally or run the iOS app binary locally",
"aliases": [],
"hidden": false,
"path": "/packages/expo/src/executors/run/schema.json",
"type": "executor"
}