Starter project to create your own generators for EventCatalog.
git clone git@github.com:event-catalog/generator-template.git
# using pnpm
pnpm i
# using npm
npm i
Link the project so it can be used in your EventCatalog.
# default package name is @eventcatalog/generator-template, this will linked
npm link
Navigate to your EventCatalog directory, then link the package.
# default name, this may have changed you renamed your package
npm link @eventcatalog/generator-template
Edit your eventcatalog.config.js
file and add the generator
...
generators: [
[
"@eventcatalog/generator-template",
// These are options to give your generator
{
debug: true,
}
]
]
...
In your plugin directory run:
# Just build the plugin once
pnpm run build
# Watch changes (recommended for dev)
pnpm run build -- -- watch
In your EventCatalog directory run:
npm run generate
This will run your generator code and interact with your Catalog.
You can now add your custom code to your generator to test against your catalog.
You can use the EventCatalog SDK to get utils to read, write and delete files in your Catalog easier.
Building a plugin? We would love to add it our integrations and/or GitHub org. If this is something you are interested in you can reach out on Discord or create an issue in this project.