package yocaml_mustache

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A Wrapper around ocaml-mustache.

This module can act as a provider to inject metadata in a template written in Mustache.

Build additions

val apply_as_template : (module Yocaml.Metadata.INJECTABLE with type t = 'a) -> ?strict:bool -> Yocaml.Filepath.t -> ('a * string, 'a * string) Yocaml.Build.t

Applies a file as a template. (and replacing the metadata). Once the content has been transformed, the arrow returns a pair containing the metadata and the file content injected into the template.

Types

type t = Yocaml.Key_value.Jsonm_object.t

An alias for Mustache.Json.value.

Conversion function

val to_string : ?strict:bool -> (string * t) list -> string -> string

to_string variables templates produces a string where variables have been applied.

Descriptor

val object_ : (string * t) list -> t
val list : t list -> t
val string : string -> t
val boolean : bool -> t
val integer : int -> t
val float : float -> t
val atom : string -> t
val null : t
OCaml

Innovation. Community. Security.