mustache-d 0.1.3

Mustache template engine for D.


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Build Status

Mustache for D

Mustache is a push-strategy (a.k.a logic-less) template engine.

Features

  • Variables

  • Sections

  • Lists

  • Non-False Values

  • Lambdas(half implementation)

  • Inverted

  • Comments

  • Partials

Usage

See example directory and DDoc comments.

Mustache.Option

  • ext(string)

File extenstion of Mustache template. Default is "mustache".

  • path(string)

root path to read Mustache template. Default is "."(current directory).

  • findPath(string delegate(string))

callback to dynamically find the path do a Mustache template. Default is none. Mutually exclusive with the path option.

  • level(CacheLevel)

Cache level for Mustache's in-memory cache. Default is "check". See DDoc.

  • handler(String delegate())

Callback delegate for unknown name. handler is called if Context can't find name. Image code is below.

if (followable context is nothing)
    return handler is null ? null : handler();

TODO

Working on CTFE.

man page

Copyright (c) 2011 Masahiro Nakagawa

Distributed under the Boost Software License, Version 1.0.

Authors:
  • Masahiro Nakagawa
Dependencies:
none
Versions:
0.1.3 2017-Jan-05
0.1.2 2016-Dec-06
0.1.1 2015-May-22
0.1.0 2014-Oct-04
~master 2017-Jan-05
Show all 5 versions
Download Stats:
  • 45 downloads today

  • 237 downloads this week

  • 1180 downloads this month

  • 18829 downloads total

Score:
4.4
Short URL:
mustache-d.dub.pm