Skip to content

Releases: michaeljones/matcha

0.19.0

01 Dec 19:43
Compare
Choose a tag to compare

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

01 Dec 19:44
Compare
Choose a tag to compare
  • 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 to clap for command line options parsing. This should be transparent to the user.

0.17.0

02 Dec 19:48
Compare
Choose a tag to compare

Changed to use type keyword in StringBuilder import in the generated Gleam code as suits recent versions of the Gleam compiler.

0.16.0

23 Oct 09:29
Compare
Choose a tag to compare

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

13 Jun 18:22
Compare
Choose a tag to compare

Breaking change: No longer includes gleam/list import for templates that don't use the for
syntax. This is to avoid the import potentially be unused. If you use gleam/list for other
things in your template then you'll have to explicitly import it.

Thank you to @lpil for reporting the issue.

0.14.0

14 May 15:03
Compare
Choose a tag to compare

Fixed build for MacOS arm64.

Thank you to @michallepicki for noticing and fixing the issue.

0.13.0

02 Apr 19:42
Compare
Choose a tag to compare

Rename project to 'matcha'.

I will stop renaming it now.

0.12.0

01 Apr 13:54
Compare
Choose a tag to compare

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

01 Apr 13:14
Compare
Choose a tag to compare

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.

0.10.0

18 Feb 21:07
Compare
Choose a tag to compare

Added comment to generated files to indicate that they are auto-generated and ideally should not be edited.

Thank you to @lpil for the suggestion.