Class: Decorator

decorator~Decorator(logger, compiler) → {Decorator}

new Decorator(logger, compiler) → {Decorator}

Layout decorator.

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

Methods

(async) decorate(file) → {String}

Decorate input file with layout.

Parameters:
Name Type Description
file File
Source:
Returns:
Type
String

list() → {Array.<String>}

List registered layout.

Source:
Returns:
Type
Array.<String>

register(layout, fn)

Register a decorate function.

Parameters:
Name Type Description
layout String
fn decorateCallback | String

If string, will call Compiler while decorating.

Source: