From f1d6c51a6c2f66d3e76afb963cd71cdecd0126b5 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Fri, 18 Nov 2022 10:34:54 -0300 Subject: [PATCH 1/2] root can be arrays. --- docs/jsdoc/options.jsdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/jsdoc/options.jsdoc b/docs/jsdoc/options.jsdoc index 871d68d8..7747bb14 100644 --- a/docs/jsdoc/options.jsdoc +++ b/docs/jsdoc/options.jsdoc @@ -44,9 +44,9 @@ * The filename of the template. Required for inclusion and caching unless * you are using {@link module:ejs.renderFile}. Also used for error reporting. * - * @property {String} [root=undefined] - * The path to the project root. When this is set, absolute paths for includes - * (/filename.ejs) will be relative to the project root. + * @property {String|String[]} [root=undefined] + * The path to the template root(s). When this is set, absolute paths for includes + * (/filename.ejs) will be relative to the template root(s). * * @property {String} [openDelimiter='<'] * The opening delimiter for all statements. This allows you to clearly delinate From 9cc37d7c356e0bcd1d090d1483cd5999638d5bea Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Fri, 18 Nov 2022 10:35:30 -0300 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0dcb676b..81a9aa10 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ You should never give end-users unfettered access to the EJS render method, If y - `cache` Compiled functions are cached, requires `filename` - `filename` The name of the file being rendered. Not required if you are using `renderFile()`. Used by `cache` to key caches, and for includes. - - `root` Set project root for includes with an absolute path (e.g, /file.ejs). + - `root` Set template root(s) for includes with an absolute path (e.g, /file.ejs). Can be array to try to resolve include from multiple directories. - `views` An array of paths to use when resolving includes with relative paths. - `context` Function execution context