Skip to content

Commit

Permalink
docs(core): add examples for runtime & env inputs (#19129)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKless authored Sep 12, 2023
1 parent a3f91f3 commit f639883
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions docs/shared/reference/project-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,41 @@ The `inputs` and `namedInputs` are parsed with the following rules:

#### Runtime Inputs

Examples:
Nx will execute the command specified by `runtime` inputs and use the result when calculating hashes.

Example:

- `{runtime: "node -v"}`
```
{
"targets": {
"build": {
"executor" : "@nx/js:tsc",
"inputs" : [{"runtime": "node -v"}]
}
}
}
```

Note the result value is hashed, so it is never displayed.
Note: the result is hashed, so it is never displayed.

#### Env Variables

Examples:
Nx will read the environment variable specified by `env` inputs and use it when calculating hashes.

Example:

- `{env: "MY_ENV_VAR"}`
```
{
"targets": {
"build": {
"executor" : "@nx/js:tsc",
"inputs" : [{"env": "DEMO_VAR"}]
}
}
}
```

Note the result value is hashed, so it is never displayed.
Note: the value is hashed, so it is never displayed.

#### External Dependencies

Expand Down

1 comment on commit f639883

@vercel
Copy link

@vercel vercel bot commented on f639883 Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev

Please sign in to comment.