You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to see Nx support post- tasks on project targets. Other tools like npm do implement this feature.
Motivation
It is very usual to need to run a task after running a target, for example after running build target. Maybe not everyone needs this, but it would be really helpful to have it.
For example, I'm working on an Angular project right now where I need to instrument all generated js files after building for production by running a command. Now, to do it, I would need to add an additional target like "build-full", and rename all references of "build" target to the new "build-full"... Or another approach would be to implement a custom builder for my angular app and give it the ability to run a target after building. Both of them are really tedious, from my point of view. Also, please, consider that other tools like NPM do implement this feature (https://docs.npmjs.com/cli/v10/using-npm/scripts#pre--post-scripts). "DependsOn" works well for pre tasks, but we need something similar for post tasks.
I have seen that this feature request was also requested in the past and discarded, but I would appreciate you check it out again. Le me reference a past requests which was closed by inactivity:
Description
I would like to see Nx support post- tasks on project targets. Other tools like npm do implement this feature.
Motivation
It is very usual to need to run a task after running a target, for example after running
build
target. Maybe not everyone needs this, but it would be really helpful to have it.For example, I'm working on an Angular project right now where I need to instrument all generated js files after building for production by running a command. Now, to do it, I would need to add an additional target like "build-full", and rename all references of "build" target to the new "build-full"... Or another approach would be to implement a custom builder for my angular app and give it the ability to run a target after building. Both of them are really tedious, from my point of view. Also, please, consider that other tools like NPM do implement this feature (https://docs.npmjs.com/cli/v10/using-npm/scripts#pre--post-scripts). "DependsOn" works well for pre tasks, but we need something similar for post tasks.
I have seen that this feature request was also requested in the past and discarded, but I would appreciate you check it out again. Le me reference a past requests which was closed by inactivity:
#9054
Suggested Implementation
postTargets
syntax would be equal todependsOn
.Alternate Implementations
This approach would allow us to have different post targets by configuration. "PostTargets" option would be like a reserved option for an executor.
The text was updated successfully, but these errors were encountered: