mustache - Mustache - Main package
Welcome to the Mustache project for Tcl, written by Andreas Kupries.
It provides a set of five related Tcl packages for the parsing and rendering of mustache-style logic-less templates, plus an application for easy command-line access to the functionality.
For availability please read Mustache - How To Get The Sources.
The mustache package is the highest-level package provided by the project. It provides a number of convenience commands encapsulating two common usecases.
For any not-so common case it is necessary to directly use the lower-level packages, i.e. mustache::parse, and mustache::render.
The exported commands are:
This command parses the mustache template, renders it using the context as the source of the data to interpolate, and returns the result.
The command throws errors when the template cannot be parsed.
The command expects context to be command prefix supporting the API of mustache::context objects.
This command renders the pre-parsed template using the context as the source of the data to interpolate, and returns the result.
This is useful if the same template has to be applied to many different contexts, as the template will be parsed only once. Which the caller is responsible for, using the mustache::parse package.
The command expects context to be command prefix supporting the API of mustache::context objects.
Both the package(s) and this documentation will undoubtedly contain bugs and other problems. Please report such at Mustache Tracker.
Please also report any ideas you may have for enhancements of either package(s) and/or documentation.
Copyright © 2019-2021 Andreas Kupries
Copyright © 2019-2021 Documentation, Andreas Kupries