generator
generator copied to clipboard
feat: add hooks library to generator
Resolves https://github.com/asyncapi/generator/issues/1270
I added inline comments for some more context on the PR
What this PR does? from the changeset:
- Package
@asyncapi/generator-hooksis now part ofgeneratorrepo and won't be released separately. Source code is stored underapps/hooksbut the package/library name stays as it was originally for backward compatibility, - By default
@asyncapi/generator-hookspackage, known as package with a lot of different hooks used in templates, is available in the generator and you no longer have to configure it in yourpackage.jsonindependencies. Package@asyncapi/generator-hookswill no longer be published to NPM separately and is deprecated. You can still have your own hooks, and you can still store them in a separate package and configure with your template, - Remember that the fact that hooks package is now included by default, doesn't mean all hooks from it are enabled by default. You still have to enable given hook in the configuration explicitly because some hooks can execute automatically without passing a specific parameter. Also hook's supported parameters also need to be defined in your template's config.
Also, next steps after it is merged:
- archive https://github.com/asyncapi/generator-hooks
- deprecate https://www.npmjs.com/package/@asyncapi/generator-hooks