serum v0.13.0 Serum.Template.Compiler

This module handles template loading and preprocessing.

Link to this section Summary

Functions

Compiles a list of template files.

Compiles the given EEx string.

Link to this section Types

Link to this type

templates()
templates() :: %{optional(binary()) => Serum.Template.t()}

Link to this section Functions

Link to this function

compile_files(files, type)

Compiles a list of template files.

A code that requires and imports Serum.Template.Helpers is injected before the input data.

Link to this function

compile_string(data, kind)
compile_string(binary(), Serum.Template.template_type()) ::
  {:ok, Macro.t()} | {:ct_error, binary(), integer()}

Compiles the given EEx string.