TemplateCompiler

TemplateCompiler

new TemplateCompiler()

Source:

Methods

_compileFile(inputPath, inputFile, outputPath, context) → {Promise}

Compiles the given template file and writes to the output directory. Commands are executed using the given context.
Source:
Parameters:
Name Type Description
inputPath String the base path of the input file
inputFile String the input file
outputPath String the output path of the compiled files
context Object the context that will be used to execute commands and interpolate placeholders
Returns:
Type:
Promise
a promise that will be resolved once all templates are compiled

compile(inputPath, inputFile, outputPath, context) → {Promise}

Compiles the given template file and writes to the output directory. Commands are executed using the given context.
Source:
Parameters:
Name Type Description
inputPath String the base path of the input file
inputFile String the input file
outputPath String the output path of the compiled files
context Object the context that will be used to execute commands and interpolate placeholders
Returns:
Type:
Promise
a promise that will be resolved once all templates are compiled

initialize(glob) → {Promise}

Source:
Parameters:
Name Type Description
glob String the glob pattern
Returns:
Type:
Promise
a promise that will be resolved once all templates are loaded