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(srcPath, contentopt) → {function}

Compile template into function.

Parameters:
Name Type Attributes Description
srcPath String
content String <optional>
Source:
Returns:
Type
function

register(ext, fn)

Register a compile funtion.

Parameters:
Name Type Description
ext String

Template extname starts with ..

fn compileCallback
Source: