go-template icon indicating copy to clipboard operation
go-template copied to clipboard

feat(engine): Refactor engine to support modular templates

Open linuxluigi opened this issue 2 years ago β€’ 3 comments

This PR introduces changes to the template engine to allow modular templates. A new module interface has been added, making it possible to create template modules in a separate git repository or folder, or even a custom binary. This allows users to create custom combinations of modules or add their own to the existing ones.

In addition, a new View interface has been added to allow for custom implementations. An example implementation has been included using the https://github.com/charmbracelet/bubbletea library.

Please note that this is a draft, and more changes will be required before this can be merged. Feedback and suggestions are welcome!

linuxluigi avatar Feb 26 '23 13:02 linuxluigi

Nice one, I also drafted a new interface two days ago which is not fully implemented yet but I guess we have some nice approaches to discuss now πŸ•ΊπŸ»

brumhard avatar Feb 26 '23 20:02 brumhard

Nice one, I also drafted a new interface two days ago which is not fully implemented yet but I guess we have some nice approaches to discuss now πŸ•ΊπŸ»

Awesome 🀩 Now we are getting there for the new version. Better to have some implementations instead only ideas 😁

linuxluigi avatar Feb 27 '23 09:02 linuxluigi

Maybe it's a good idea to split the view interface into a separate PR to make this easier to review?

johannes-riecken avatar Feb 23 '24 12:02 johannes-riecken