Orasund / elm-pen

generate your own elm modules
https://orasund.github.io/elm-pen/
1 stars 0 forks source link

Add Partial templates #2

Open Orasund opened 2 years ago

Orasund commented 2 years ago

A few things (like the type annotation for arbitary types) are used all the time. It would be better to move them into a set of partial templates.

The simplest solution would be to add a new folder for partials and load them before evaluating the json file.

Alternatively, we load the partials on a template-by-template basis. But then we need to ensure that all partials are always up-to-date

A third solution would add a config file for every template. In there one could specify the needed partials, but also other parameters like a config schema or a template engine (if we ever support more then just handlebars)

Orasund commented 2 years ago

Newest version now comes with a config file. so the third option could be already implemented.