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

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

Types

Constructors

val object_ : (string * t) list -> t

Produces an object indexed by string.

val list : t list -> t

Produces a list of t.

val string : string -> t

Produces a String.

val boolean : bool -> t

Produces a Booelan.

val integer : int -> t

Produces an Integer.

val float : float -> t

Produces a Float.

val atom : string -> t

Produces an Atom.

val null : t

Produces a Null value.

OCaml

Innovation. Community. Security.