import { type ejs } from "https://deno.land/x/next_php@1.1.2/src/deps.ts";
const { Options } = ejs;
Properties
Log the generated JavaScript source for the EJS template to the console.
Include additional runtime debugging information in generated template functions.
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 templates root(s). When this is set, absolute paths for includes (/filename.ejs) will be relative to the templates root(s).
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.
Name to use for the object storing local variables when not using with
or destructuring.
Set to a string (e.g., 'echo' or 'print') for a function to print output inside scriptlet tags.
An array of paths to use when resolving includes with relative paths
Custom function to handle EJS includes