Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Haskell implementation of mustache templates

License

NotificationsYou must be signed in to change notification settings

JustusAdam/mustache

Repository files navigation

Build StatusHackageJoin the chat at https://gitter.im/JustusAdam/mustache

Haskell implementation ofmustache templates.

Implements the officialspecs version 1.1.3

Motivation

The old Haskell implementation of mustache templateshastache 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 thedocumentation on hackage.

Executablehaskell-mustache

$ haskell-mustache --helpSimple mustache template substitutionarguments [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 theTEMPLATE once with eachDATA-FILE

Example

$ haskell-mustache my-template-file data-file-1.json data-file-2.json data-file-3.json

Roadmap

  • String parser for mustache templates
  • Template substitution
  • Standalone executable
  • Support for 'set delimiter'
  • More efficiency usingText rather thanString
  • More efficient Text parsing
  • Test coverage provided via the officialspecs
  • Haddock documentation
  • More instances forToMustache typeclass

About

Haskell implementation of mustache templates

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors18


[8]ページ先頭

©2009-2025 Movatter.jp