Class: Compiler

compiler~Compiler(logger) → {Compiler}

new Compiler(logger) → {Compiler}

Template compiler.

Parameters:
Name Type Description
logger Logger
Source:
Returns:
Type
Compiler

Methods

(async) compile(filepath, content) → {function}

Compile template into function.

Parameters:
Name Type Description
filepath String
content String
Source:
Returns:
Type
function

register(ext, fn)

Register a compile funtion.

Parameters:
Name Type Description
ext String

Template extname starts with ..

fn compileCallback
Source: