Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/next_php/src/deps.ts>ejs.Options

NextPHP is a web framework enabling you to write PHP in JavaScript.
Latest
interface ejs.Options
import { type ejs } from "https://deno.land/x/next_php@1.1.2/src/deps.ts";
const { Options } = ejs;

Properties

optional
debug: boolean | undefined

Log the generated JavaScript source for the EJS template to the console.

optional
compileDebug: boolean | undefined

Include additional runtime debugging information in generated template functions.

optional
_with: boolean | undefined

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).

optional
strict: boolean | undefined

Whether to run in strict mode or not. Enforces _with=false.

optional
destructuredLocals: string[] | undefined

An array of local variables that are always destructured from localsName, available even in strict mode.

optional
rmWhitespace: boolean | undefined

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).

optional
client: boolean | undefined

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.

optional
escape: EscapeCallback | undefined

The escaping function used with <%= construct. It is used in rendering and is .toString()ed in the generation of client functions.

optional
filename: string | undefined

The filename of the template. Required for inclusion and caching unless you are using renderFile. Also used for error reporting.

optional
root: string[] | string | undefined

The path to templates root(s). When this is set, absolute paths for includes (/filename.ejs) will be relative to the templates root(s).

optional
openDelimiter: string | undefined

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.)

optional
closeDelimiter: string | undefined

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.)

optional
delimiter: string | undefined

Character to use with angle brackets for open/close

optional
cache: boolean | undefined

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.

optional
context: any

The Object to which this is set during rendering.

optional
async: boolean | undefined

Whether or not to create an async function instead of a regular function. This requires language support.

optional
beautify: boolean | undefined

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.

optional
localsName: string | undefined

Name to use for the object storing local variables when not using with or destructuring.

optional
outputFunctionName: string | undefined

Set to a string (e.g., 'echo' or 'print') for a function to print output inside scriptlet tags.

optional
views: string[] | undefined

An array of paths to use when resolving includes with relative paths

optional
includer: IncluderCallback

Custom function to handle EJS includes