Class AbstractJsTemplateCompiler
java.lang.Object
ro.isdc.wro.extensions.processor.support.template.AbstractJsTemplateCompiler
- Direct Known Subclasses:
DustJs,HandlebarsJs,HoganJs
A base class for template processors like: dustJS or hoganJS.
- Since:
- 1.4.7
- Author:
- Eivind Barstad Waaler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCompiles the javascript template into plain javascript.protected Stringprotected abstract Stringprotected abstract InputStream
-
Constructor Details
-
AbstractJsTemplateCompiler
public AbstractJsTemplateCompiler()
-
-
Method Details
-
compile
Compiles the javascript template into plain javascript.- Parameters:
content- the template to be compiled.optionalArgument- any additional arguments used by template script.- Returns:
- the compiled javascript.
-
getCompileCommand
- Returns:
- the js statement used to execute the compilation of the template.
-
getArguments
- Returns:
- additional arguments for the compiler.
-
getCompilerAsStream
- Returns:
- the stream of the compiler resource (javascript) used to compile templates.
- Throws:
IOException- if the stream could not be located.
-