import { type Options } from "https://deno.land/x/view_engine@v10.6.0/node_modules/@types/ejs/index.d.ts";
Properties
Whether or not to use with () {}
construct in the generated template
functions. If set to false
, data is still accessible through the object
whose name is specified by ejs.localsName
(defaults to locals
).
An array of local variables that are always destructured from localsName
,
available even in strict mode.
Remove all safe-to-remove whitespace, including leading and trailing
whitespace. It also enables a safer version of -%>
line slurping for all
scriptlet tags (it does not strip new lines of tags in the middle of a
line).
Whether or not to compile a ClientFunction
that can be rendered
in the browser without depending on ejs.js. Otherwise, a TemplateFunction
will be compiled.
The escaping function used with <%=
construct. It is used in rendering
and is .toString()
ed in the generation of client functions.
The filename of the template. Required for inclusion and caching unless
you are using renderFile
. Also used for error reporting.
The path to the project root. When this is set, absolute paths for includes (/filename.ejs) will be relative to the project root.
The opening delimiter for all statements. This allows you to clearly delinate the difference between template code and existing delimiters. (It is recommended to synchronize this with the closeDelimiter property.)
The closing delimiter for all statements. This allows to to clearly delinate the difference between template code and existing delimiters. (It is recommended to synchronize this with the openDelimiter property.)
Whether or not to enable caching of template functions. Beware that the options of compilation are not checked as being the same, so special handling is required if, for example, you want to cache client and regular functions of the same file.
Requires filename
to be set. Only works with rendering function.
Whether or not to create an async function instead of a regular function. This requires language support.
Make sure to set this to 'false' in order to skip UglifyJS parsing,
when using ES6 features (const
, etc) as UglifyJS doesn't understand them.