What should be in the Vendure plugin template? #2039
Replies: 3 comments
-
I'd like to also add that there are 2 use-cases for a plugin template:
I'd say that use-case 2 is much, much more common and we should optimize for this. Most Vendure plugins are internal to a single app. And even plugins created expressly for distribution via npm will likely be part of an existing monorepo. So we should design any changes with this in mind. This makes the "codegen" option possibly moot, since we can usually assume the tooling for this already exists and is configured. |
Beta Was this translation helpful? Give feedback.
-
Agreed, I also had option 2 in mind. In case of an existing project it doesn't make sense indeed. I will leave it out, and add links in the Readme to stuff like codegen and Admin UI compilation |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Even though it was a great start, the original template is a bit outdated: https://github.com/vendure-ecommerce/plugin-template
I would like to update the template and make it more maintanable. To keep it maintainable, I propose to not include every available feature in the template, because that means we need to keep all of those features up to date and in line with the docs.
So, what should at least be in the plugin? What I've got so far:
It should at least include:
example.plugin.ts
example.service.ts
test/e2e.spec
test/dev-server.ts
Up for discussion
😄 graphql-codegen to generate Graphql types
🎉 Custom fields
❤️ Custom entities
🚀 Admin UI + compilation
👀 shop/admin graphql extensions with a
resolver.ts
Something else that's not on this list?
Let me know what you think.
You can vote by commenting the corresponding emoticon to this message
Beta Was this translation helpful? Give feedback.
All reactions