(I) Fixed the use of html-minifier with ejs.
1) Minification now works in production mode
2) Minification now works when rendering ejs with async set to true
(II) Added support for local options of the render function.
1) Third parameter of .render() can include extra options/overrides for the renderer that are used to compile the template.
2) Local options always override global ones
3) If caching is applied (in production mode) only local options that have been specified for the first rendering of the file are used in template's compilation. Every further request for the same file must have similar options. Dynamic generation of options should be considered undefined behavior and avoided in production mode.
4) If local options are not specified, global are used.
5) Backwards compatibility: should be reserved. Local options do not have effect if not applied; local options are transferred to readCallback as the last parameter which will just always be undefined in old code.
(I) Fixed the use of html-minifier with ejs. 1) Minification now works in production mode 2) Minification now works when rendering ejs with async set to true
(II) Added support for local options of the render function. 1) Third parameter of .render() can include extra options/overrides for the renderer that are used to compile the template. 2) Local options always override global ones 3) If caching is applied (in production mode) only local options that have been specified for the first rendering of the file are used in template's compilation. Every further request for the same file must have similar options. Dynamic generation of options should be considered undefined behavior and avoided in production mode. 4) If local options are not specified, global are used. 5) Backwards compatibility: should be reserved. Local options do not have effect if not applied; local options are transferred to readCallback as the last parameter which will just always be undefined in old code.
Checklist
npm run test
andnpm run benchmark