Releases: michaeljones/matcha
0.19.0
Breaking change: Templates now use the StringTree
type from the standard library instead of the StringBuilder
type which has been deprecated. This means that projects using matcha
should use gleam_stdlib >= 0.42.0
.
Generated template modules now expose a render_tree
function instead of render_builder
. They continue to expose
a render
function as before.
Thank you to @diemogebhardt for implementing this.
0.18.0
-
Changed to only generating the
.gleam
output if the.matcha
file has a newer modified timestamp than the.gleam
file. This avoids constantly regenerating the output files which in turn avoids messing up the formatting if the
output file had been formatted.Thank you to @perrygeo for noticing and fixing the issue.
-
Switched from
structopt
toclap
for command line options parsing. This should be transparent to the user.
0.17.0
Changed to use type
keyword in StringBuilder
import in the generated Gleam code as suits recent versions of the Gleam compiler.
0.16.0
Support {> fn
and {> pub fn
syntax for declaring private and public functions within the template file. This allows better locality of helper functions and easy access to template behaviour.
Template files which only have function declarations and no meaningful template content will not have the render
and render_builder
methods so they can be used library modules with just helper functions.
0.15.0
0.14.0
Fixed build for MacOS arm64.
Thank you to @michallepicki for noticing and fixing the issue.
0.13.0
Rename project to 'matcha'.
I will stop renaming it now.
0.12.0
Rename the project to 'green-tea' as the previous name was essentially 'templates' which is too plain and generic to be comfortable using.
0.11.0
Support arbitrary Gleam syntax in value, if-condition and for-loop source locations. This means that more work can be done by the compiled template file rather than having to preprocess data before rendering the template.
The template system does not parse the Gleam expressions and so will allow invalid Gleam syntax to be added which will cause an error with the Gleam compiler.
Thank you to @lpil for the suggestion.