The mustache package

[Tags:bsd3, library, program, test]

Allows parsing and rendering template files with mustache markup. See the mustache language reference.

Implements the mustache spec version 1.1.3.

Note: Versions including and beyond 0.4 are compatible with ghc 7.8 again.


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.3.0.1, 0.3.1.0, 0.4.0.0, 0.4.0.1, 0.5.0.0, 0.5.1.0, 1.0, 1.0.1, 1.0.2, 2.0, 2.0.1, 2.1, 2.1.1, 2.1.2 (info)
Change log CHANGELOG.md
Dependencies aeson, base (>=4.7 && <5), bytestring, cmdargs, containers, directory, either, filepath, mtl (>=2.2.1), mustache, parsec, scientific, template-haskell, text, th-lift, unordered-containers, vector, yaml [details]
License BSD3
Copyright (c) 2015, 2016 Justus Adam
Author Justus Adam
Maintainer dev@justus.science
Stability Unknown
Category Development
Home page https://github.com/JustusAdam/mustache
Bug tracker https://github.com/JustusAdam/mustache/issues
Source repository head: git clone git://github.com/JustusAdam/mustache.git
this: git clone git://github.com/JustusAdam/mustache.git -b master(tag v2.1)
Uploaded Fri Nov 11 10:55:21 UTC 2016 by justus
Distributions LTSHaskell:2.1.2, NixOS:2.1.2, Stackage:2.1.2, Tumbleweed:2.1.2
Downloads 894 total (21 in the last 30 days)
Votes
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for mustache

Readme for mustache-2.1.2

mustache Travis Status Hackage Join the chat at <a href="https://gitter.im/JustusAdam/mustache">https://gitter.im/JustusAdam/mustache</a>

Haskell implementation of mustache templates.

Implements the official specs version 1.1.3

Motivation

The old Haskell implementation of mustache templates hastache seemed pretty abandoned to me. This implementation aims to be much easier to use and (fingers crossed) better maintained.

Since it is so easy to use and requires but a few files of code, I've also written a small executable that compiles and renders mustache templates with data input from json or yaml files.

Usage

Library

Please refer to the documentation on hackage.

Executable haskell-mustache

$ haskell-mustache --help
Simple mustache template substitution

arguments [OPTIONS] TEMPLATE [DATA-FILES]

Common flags:
  -t --templatedirs[=DIRECTORY]  The directory in which to search for the
                                 templates
  -? --help                      Display help message
  -V --version                   Print version information

Current implementation substitutes the TEMPLATE once with each DATA-FILE

Roadmap

  • [x] String parser for mustache templates
  • [x] Template substitution
  • [x] Standalone executable
  • [x] Support for 'set delimiter'
  • [x] More efficiency using Text rather than String
  • [x] More efficient Text parsing
  • [x] Test coverage provided via the official specs
  • [x] Haddock documentation
  • [ ] More instances for ToMustache typeclass