nx/docs/generated/devkit/TargetConfiguration.md
Leosvel Pérez Espinosa add5a675c3
feat(misc): add nx syncing mechanism and update the typescript-sync generator (#26793)
- Add the `nx sync` command to run sync generators and apply changes to
bring the workspace up to date according to their logic.
- Add the `nx sync:check` command to validate that the workspace is up
to date by running the sync generators without applying the changes. It
can be used on CI as a validation check.
- Update the task runner to run the sync generators (or obtain their
state from the daemon) and prompt the user whether to apply the changes,
if any
- This is only run if the `NX_ENABLE_SYNC_GENERATORS` environment
variable is set to `'true'`
  - Allow the user to configure a default value for the prompt
- Update the `@nx/js:typescript-sync` generator (keep tsconfig project
references in sync with the project graph) with misc fixes

<!-- 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 NXC-787 -->
<!-- Fixes NXC-788 -->
<!-- Fixes NXC-789 -->

Fixes #
2024-08-12 10:44:04 -04:00

132 lines
2.8 KiB
Markdown

# Interface: TargetConfiguration\<T\>
Target's configuration
## Type parameters
| Name | Type |
| :--- | :---- |
| `T` | `any` |
## Table of contents
### Properties
- [cache](../../devkit/documents/TargetConfiguration#cache): boolean
- [command](../../devkit/documents/TargetConfiguration#command): string
- [configurations](../../devkit/documents/TargetConfiguration#configurations): Object
- [defaultConfiguration](../../devkit/documents/TargetConfiguration#defaultconfiguration): string
- [dependsOn](../../devkit/documents/TargetConfiguration#dependson): (string | TargetDependencyConfig)[]
- [executor](../../devkit/documents/TargetConfiguration#executor): string
- [inputs](../../devkit/documents/TargetConfiguration#inputs): (string | InputDefinition)[]
- [metadata](../../devkit/documents/TargetConfiguration#metadata): TargetMetadata
- [options](../../devkit/documents/TargetConfiguration#options): T
- [outputs](../../devkit/documents/TargetConfiguration#outputs): string[]
- [parallelism](../../devkit/documents/TargetConfiguration#parallelism): boolean
- [syncGenerators](../../devkit/documents/TargetConfiguration#syncgenerators): string[]
## Properties
### cache
`Optional` **cache**: `boolean`
Determines if Nx is able to cache a given target.
---
### command
`Optional` **command**: `string`
Used as a shorthand for nx:run-commands, a command to run.
---
### configurations
`Optional` **configurations**: `Object`
Sets of options
#### Index signature
▪ [config: `string`]: `any`
---
### defaultConfiguration
`Optional` **defaultConfiguration**: `string`
A default named configuration to use when a target configuration is not provided.
---
### dependsOn
`Optional` **dependsOn**: (`string` \| [`TargetDependencyConfig`](../../devkit/documents/TargetDependencyConfig))[]
This describes other targets that a target depends on.
---
### executor
`Optional` **executor**: `string`
The executor/builder used to implement the target.
Example: '@nx/rollup:rollup'
---
### inputs
`Optional` **inputs**: (`string` \| `InputDefinition`)[]
This describes filesets, runtime dependencies and other inputs that a target depends on.
---
### metadata
`Optional` **metadata**: `TargetMetadata`
Metadata about the target
---
### options
`Optional` **options**: `T`
Target's options. They are passed in to the executor.
---
### outputs
`Optional` **outputs**: `string`[]
List of the target's outputs. The outputs will be cached by the Nx computation
caching engine.
---
### parallelism
`Optional` **parallelism**: `boolean`
Whether this target can be run in parallel with other tasks
Default is true
---
### syncGenerators
`Optional` **syncGenerators**: `string`[]
List of generators to run before the target to ensure the workspace
is up to date.