Closed BD103 closed 8 months ago
The way it's going to work for v2 is that you will have some built-in filters/fn/tests that don't require deps directly in Tera. Anything else will be a in a tera-contrib package with individual features for each element
Would I be able to make a PR for v1 while v2 is still a work in progress? Or do you think v2 is stable enough to make the switch already?
My plan is to decrease the amount of dependencies Bevy uses in its CI, with Tera being the first on the list. The only filter it needs is slugify
. The templates are relatively simple.
v2 is not coming that soon. For your usecase you can just disable the built-in feature and copy paste the slugify filter?
To be honest I didn't realize you can register your own filters. Thanks for the idea!
Have a good weekend
In order to use builtin filters and functions, you have to enable the
builtin
feature:https://github.com/Keats/tera/blob/290889e61e9fda317f42f284e7a875342424d646/Cargo.toml#L48
This feature requires 6 different dependencies, some of which you may not need (like
rand
). Instead of requiring an "all or nothing" approach, what if instead specific builtins are enabled only if the dependency they require is also enabled?For instance,
slugify
would only require theslug
feature to be enabled:Source
I would love to work on this if the idea gets approved! :)