docs(core): document NX_GRAPH_CREATION (#28111)

Documents the NX_GRAPH_CREATION environment variable

Related to #27244
This commit is contained in:
Isaac Mann 2024-09-27 08:35:16 -04:00 committed by GitHub
parent 266fb09725
commit 154aedefa8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,12 +36,13 @@ The following environment variables are ones that you can set to change the beha
Nx will set the following environment variables so they can be accessible within the process even outside of executors and generators.
| Property | Type | Description |
| ---------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------- |
| NX_TASK_TARGET_PROJECT | string | Set to the project name of the task being run. Use this to tell which project is being run. |
| NX_TASK_TARGET_TARGET | string | Set to the target name of the task being run. Use this to tell which target of the project is being run. |
| NX_TASK_TARGET_CONFIGURATION | string | Set to the configuration name of the task being run. Use this to tell which configuration of the target is being run. |
| NX_DRY_RUN | boolean | Set to `true` during dry runs of generators. Use this to avoid side effects during generators. |
| NX_INTERACTIVE | boolean | Set to `false` when running generators with `--interactive=false`. Use this to prevent prompting during generators |
| Property | Type | Description |
| ---------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| NX_TASK_TARGET_PROJECT | string | Set to the project name of the task being run. Use this to tell which project is being run. |
| NX_TASK_TARGET_TARGET | string | Set to the target name of the task being run. Use this to tell which target of the project is being run. |
| NX_TASK_TARGET_CONFIGURATION | string | Set to the configuration name of the task being run. Use this to tell which configuration of the target is being run. |
| NX_GRAPH_CREATION | boolean | Set to `true` during the graph creation process. Use this to have inference plugins run different code during graph creation versus during task execution |
| NX_DRY_RUN | boolean | Set to `true` during dry runs of generators. Use this to avoid side effects during generators. |
| NX_INTERACTIVE | boolean | Set to `false` when running generators with `--interactive=false`. Use this to prevent prompting during generators |
[Nx Cloud Environment Variables](/ci/reference/env-vars) are listed on a dedicated page.