Class HandlebarsTemplateCompilerConfig
java.lang.Object
com.mohamnag.jstatic.plugins.handlebars_template_compiler.HandlebarsTemplateCompilerConfig
Loads the configuration from "handlebars-template-compiler" key and expects following sub-keys:
- "base-dir" pointing to templates' base, this path will be prepended to all other paths and every look up is restricted to be inside this path
- "template-data-field" defines the name of the field under which each node of data tree can specify its own template to be used for template lookup
- "default-template" defines the default template that will be used if a node does not specify its own
- "target-data-field" the field's name under which the compilation result for each node of data tree will be stored
- "helpers" list of helpers that should be registered. Each entry is either the full name of a Java plugin that should be present in classpath or a path to a JavaScript file that contains helpers' code.
- "start-node" can be set to one node's path to restrict compilation to subsets of the data tree. The path should be set as a ordered list of keys that define the path.
For more details on the functionality see the docs on HandlebarsTemplateCompilerTask
itself.
-
Field Details
-
KEY_CONFIGURATION
- See Also:
-
KEY_BASE_DIR
- See Also:
-
KEY_DEFAULT_TEMPLATE
- See Also:
-
KEY_TARGET_DATA_FIELD
- See Also:
-
KEY_TEMPLATE_DATA_FIELD
- See Also:
-
KEY_HELPERS
- See Also:
-
KEY_START_NODE
- See Also:
-
-
Constructor Details
-
HandlebarsTemplateCompilerConfig
-
-
Method Details
-
getBaseDir
-
getDefaultTemplate
-
getTargetDataField
-
getTemplateDataField
-
getHelpers
-
getStartNode
-