File: README.markdown

package info (click to toggle)
mustache-d 0.1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 192 kB
  • sloc: makefile: 7
file content (70 lines) | stat: -rw-r--r-- 1,349 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
[![Build Status](https://travis-ci.org/repeatedly/mustache-d.png)](https://travis-ci.org/repeatedly/mustache-d)

# 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.

# Link

* [{{ mustache }}](http://mustache.github.com/)

* [mustache(5) -- Logic-less templates.](http://mustache.github.com/mustache.5.html)

man page

# Copyright

    Copyright (c) 2011 Masahiro Nakagawa

Distributed under the Boost Software License, Version 1.0.