-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): merge more target options from targetDefaults #12435
feat(core): merge more target options from targetDefaults #12435
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
d78feda
to
f797af7
Compare
Nice! This will allow to set |
Does this also wind up finishing resolution of #9100? Or is there liable to be further work there? |
f797af7
to
cb23961
Compare
cb23961
to
483e2a2
Compare
483e2a2
to
a60bf5c
Compare
a60bf5c
to
e868c72
Compare
e868c72
to
518e916
Compare
518e916
to
729904b
Compare
729904b
to
b884269
Compare
7d844c4
to
1ac3f7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good. Some comments:
- The docs don't cover everything. We should update the Nx repo to use this feature, dog food it and then write a recipe. Can you create tasks for it?
- I think your code can be clearer if you select better names. It's kind of hard to parse cause names appear somewhat random.
Yeah, I'll make them :)
This is a fair criticism, I'm especially bad about this when writing tests. I'll correct the naming as pointed out. Thanks Victor! |
1ac3f7a
to
63e5abb
Compare
63e5abb
to
d056d03
Compare
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Target defaults may only contain dependsOn, inputs, outputs etc and can only be applied based on the name of the target.
New Behavior
Target defaults may contain any property inside
TargetConfiguration
, and can be applied based on targetName, executorName, or both.Keys in the mapping can be any of the following:
`${executor}`
`${targetName}`
A
#
symbol is used as a separator betweentargetName
andexecutorName
. This is analogous to how we can specify an export in a module when writing a generator's implementation path.build#nx:run-commands
would indicate any target named build that usesnx:run-commands
as the executor.When merging defaults, options are merged 1 layer deep. Additionally,
{projectRoot}
and{workspaceRoot}
are valid withintargetDefaults
. As an example, merging the defaultswith the provided options:
would result in:
Related Issue(s)
Fixes #12433