mustache-0.2.0.0: A mustache template parser library.

Safe HaskellNone
LanguageHaskell2010

Text.Mustache.Compile

Synopsis

Documentation

automaticCompile :: [FilePath] -> FilePath -> IO (Either ParseError Template) Source

Compiles a mustache template provided by name including the mentioned partials.

The same can be done manually using getFile, mustacheParser and getPartials.

This function also ensures each partial is only compiled once even though it may be included by other partials including itself.

A reference to the included template will be found in each including templates partials section.

compileTemplateWithCache :: [FilePath] -> TemplateCache -> FilePath -> IO (Either ParseError Template) Source

Compile a mustache template providing a list of precompiled templates that do not have to be recompiled.

getPartials :: AST -> [FilePath] Source

Find the names of all included partials in a mustache AST.

Same as join . fmap getPartials'