Closed petermuessig closed 5 months ago
@nicoschoenteich @vobu - this extension of the Easy UI5 generator allows to configure nested generators in generators to chain the execution. This feature also switches from env.run
to composeWith
to embed the nested generators into the run of the Easy UI5 generator. But I needed to add a delegator to forward destination root changes, e.g. the typical generators app
, ts-app
are changing the destination root and this must be delegated to any follow up execution... Therefore, I injected a hidden delegator generator...
@nicoschoenteich @vobu I needed to go back to env.run
to ensure that the subgenerators make use of their dependencies rather than of the dependencies of the root generator. As I found a good way to intercept the generator executions and to determine the destinationRoot
I can also ensure to pass it properly in between the generators.
Sub generators can include nested generators as a static property which are resolved and installed automatically by Easy UI5 and finally executed in a chain after the root generator and the sub generator.
Just describe the subgenerator name as you would specify it when using Easy UI5 and if you want to address a dedicated generator in the subgenerator, just use the namespace syntax defining the dedicated generator with the
:
.