Template API

Template

The Template module implements both parsing and compiling templates.

Index

add-loader from-file template

Reference

add-loaderfunction
mendoza/template.janet at line 122, column 1
(add-loader)

Adds the custom template loader to Janet's module/loaders.

from-filefunction
mendoza/template.janet at line 108, column 1
(from-file path)

Load a template from a file. Returns the template function.

templatefunction
mendoza/template.janet at line 12, column 1
(template source &opt where)

Compile a bar template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.