[ Home | Main Table Of Contents | Table Of Contents | Keyword Index ]

mustache-changes(n) 1.1 doc "Mustache. Packages for logic-less templating"

Name

mustache-changes - Mustache - Log of Changes

Table Of Contents

Description

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.

This document provides an overview of the changes mustache underwent from version to version.

Changes

Changes for version 1.2

Version 1.2 is in development and has not been released yet

  1. Attention

    Added a new string! type to the mustache::frame package.

    It is strongly recommended to use this type for any kind of string value instead of old type string (without a trailing !.

    Why ?

    The original string type is coded to match the expectations of the mustache specification, as laid down by its official compatibility testsuite.

    This includes some very weird behaviour for a string type: It "normalizes" any string which looks like a double number, which means anything which looks numeric. That is a very bad thing to do when your strings are, for example file and directory names, just looking like numbers. Then you call such normalization "mangling" instead and start cursing.

    The new string! type does no such mangling.

    The new type is now the standard type when converting to and from YAML, and other such representations. I.e. an external string is mapped to string! now.

    Existing code using string directly in the construction of frames has to be manually converted to use string! however.

  2. Extended the mustache::frame package with several methods specific to scalars and mappings, and one generic.

    It is now possible to change a scalar's value in place, as well as add, remove, and move key/value assignments in a mapping.

    The new generic method simplifies the writing of type checks. Instead of

    [$frame type] eq "mapping"

    it is now possible to write

    [$frame is mapping]

    etc.

Changes for version 1.1

  1. Extended the mustache::frame package to support the TclYAML version 0.5 tags for bool, float, int, null, and string.

    The pre-existing tag scalar is now a an alias for string.

    This extension of the type system makes it easier to use mustache's data frames as an in-memory representation for structured typed data. No automatic loss of type data inside of Tcl scripts now.

  2. Extended the data frames provided by package mustache::frame with methods for walking a frame tree in general, and simplifying the conversion back into external serialization formats.

  3. Extended the sequence and mapping data frames provided by package mustache::frame with methods (for) for iteration over the content, without a context.

  4. Added packages for the conversion of a data frame (tree) into various serializations:

    mustache::frame::as::events

    Serialization into a list of events describing the incremental build of the tree.

    mustache::frame::as::json

    Serialization into whitespace-free JSON.

    mustache::frame::as::tagged

    Serialization into the kind of tagged structure accepted by TclYAML's writeTags command.

Changes for version 1

This is the first release of mustache. The changes therefore describe the initial features of the system.

In detail:

  1. mustache requires Tcl 8.5 or higher. Tcl 8.4 or less is not supported.

  2. mustache requires TclOO.

  3. The project provides several high- and low-level packages for the parsing and rendering of logic-less templates as specified by Ruby's mustache package.

Related Documents

  1. Mustache - Introduction to the project

  2. Mustache - License

  3. Mustache - Log of Changes

  4. Mustache - How To Get The Sources

  5. Mustache - The Installer's Guide

  6. Mustache - The Developer's Guide

Bugs, Ideas, Feedback

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.

Keywords

logic-less templates, mustache, templating