package yocaml_mustache

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

Module Yocaml_mustacheSource

A Wrapper around ocaml-mustache.

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

Build additions

Sourceval 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

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

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

Descriptor

Types

Constructors

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

Produces an object indexed by string.

Sourceval list : t list -> t

Produces a list of t.

Sourceval string : string -> t

Produces a String.

Sourceval boolean : bool -> t

Produces a Booelan.

Sourceval integer : int -> t

Produces an Integer.

Sourceval float : float -> t

Produces a Float.

Sourceval atom : string -> t

Produces an Atom.

Sourceval null : t

Produces a Null value.

OCaml

Innovation. Community. Security.