templeo
options module
- Source:
Classes
Type Definitions
DBOptions
Template options for an IndexedDB
-like back-end. All DB options inherit from TemplateOpts
.
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
dbTypeName |
String
|
<optional> |
'indexedDB' | The |
dbLocName |
String
|
<optional> |
'templeo' | Either the |
renderTimePolicy |
String
|
<optional> |
read-all-on-init-when-empty | The policy applied to partial template DB
|
- Source:
Type:
FileOptions
Template options for a Node.js file/system back-end. All file options inherit from
TemplateOpts
.
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
relativeTo |
String
|
<optional> |
. | The base directory path that will be used during file read/write operations for partial template content and generated rendering sources. |
contextPath |
String
|
<optional> |
views | The path where the context JSON is located relative to the path set by |
templatePath |
String
|
<optional> |
views | The path where the primary template is located relative to the path set by |
partialsPath |
String
|
<optional> |
views/partials | The path where the partial templates are located/identified relative to the path set by |
watchPaths |
Boolean
|
<optional> |
When true, any |
|
unwatchPaths |
Boolean
|
<optional> |
When true, all currently |
|
outputPath |
String
|
<optional> |
When defined and a valid |
|
outputPathTempPrefix |
String
|
<optional> |
templeo-files- | When |
- Source:
Type:
Options
Template compilation options
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
useCommonJs |
Boolean
|
<optional> |
true | When true, CommonJS Module semantics will be used. When false, ECMAScript Module semantics will be used. |
contextURL |
String
|
<optional> |
'' | A base URL used as prefix for context |
partialsURL |
String
|
<optional> |
'' | A base URL used as prefix for partial template HTTP/S |
bypassUrlRegExp |
RegExp
|
<optional> |
/^https?:\/?\/?[^:\/\s]+/i | An expression that will tested against context, partial and template names
to determine if the template name will be prefixed with the |
defaultExtension |
String
|
<optional> |
'html' | The default extension name to append to template names when performing |
defaultContextExtension |
String
|
<optional> |
'json' | The default extension name to append to the context name when performing |
defaultContextName |
String
|
<optional> |
'context' | The name assigned to the context when executing a rendering funtion without passing a
context object. The name will be used to |
defaultTemplateName |
String
|
<optional> |
'template' | The name assigned to the primary template content passed into |
includesParametersName |
String
|
<optional> |
'params' | The name that will be added to each partial template scope that will contain any
parameters passed into the |
defaultPartialContent |
RegExp
|
<optional> |
' ' | The value to use for a partial when a partial returns a non-string value. |
renderTimePolicy |
String
|
<optional> |
read | The policy applied to partial template DB
|
readFetchRequestOptions |
Object
|
<optional> |
The JSON options that will be used when making |
|
writeFetchRequestOptions |
Object
|
<optional> |
The JSON options that will be used when making |
|
readFormatOptions |
Object
|
<optional> |
The formatting options passed into an optional formatter function specified during cache construction
or passed into the rendering function that will format read template content. For example, when a template is read and the desired code can
be formatted using the formatter function (e.g. |
|
writeFormatOptions |
Object
|
<optional> |
The formatting options passed into an optional format function specified during cache construction
or passed into the rendering function that will format the compiled template code that will be written. For example, when a generated template
renderer is generated either during compilation or during |
|
encoding |
String
|
<optional> |
'utf8' | The text encoding used by the templates during reads falsy value or a partial is included that cannot be resolved. Wwhen partial content is empty or cannot be found errors may be thrown when the template engine is used within an external template plugin. |
varName |
String
|
<optional> |
'it' | The variable name of passed context objects that will be accessible by reference within template expressions
(e.g. |
filename |
RegExp
|
<optional> |
/^(.*[\\\/]|^)([^\.]*)(.*)$/ | Expression that will be used to capture template names from passed definition pseudo filenames when a template name hasn't been passed __ NOTE: Should contain 3 capture groups:__
|
cacheRawTemplates |
Boolean
|
<optional> |
true | If set to |
useSourceURL |
Boolean
|
<optional> |
true | Whether or not to add a `//# sourceURL to generated rendering functions. Some option types may have a different default value. |
debugger |
Boolean
|
<optional> |
false | When |
- Source:
Type:
-
Object