Support Lifecycle Hooks for Nx Generators #32970
koliveira15
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Nx already supports task lifecycle hooks, but there’s no equivalent for generators.
A generator lifecycle API would let us run logic before/after every generator execution without modifying each generator.
Why
Currently this type of functionality requires either:
Here are a few use cases for hooks:
Proposal
Introduce hooks similar to task lifecycle hooks OR treat generator commands as tasks. Any generator invocations could use a similar hook API.
Existing
run-command
usageBeta Was this translation helpful? Give feedback.
All reactions