An EJS template engine implementation for Deno, supporting core templating features and partial includes.
dejs is an EJS (Embedded JavaScript) template engine implementation specifically designed for the Deno runtime. It enables server-side HTML generation using EJS syntax, allowing developers to create dynamic web pages with embedded JavaScript logic. The project solves the need for a familiar templating solution in Deno's native module ecosystem.
Deno developers building web applications or tools that require server-side HTML rendering, particularly those familiar with EJS syntax from Node.js ecosystems.
Developers choose dejs because it brings the widely-used EJS templating pattern to Deno with a minimal, focused API. It provides just the core EJS features needed for most projects while integrating seamlessly with Deno's standard library and security model.
ejs template engine for deno.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements essential EJS syntax like <%= %>, <%- %>, and <% %> tags for escaped output, raw HTML, and control flow, making it easy for developers familiar with EJS to adapt.
Designed specifically for Deno, with APIs like renderFile that output Deno.Reader and seamlessly work with Deno's module system, as shown in the usage examples.
Offers straightforward functions such as renderFile, renderToString, and compile for various rendering needs, with clear documentation that reduces learning curve.
Includes an include() function for embedding other templates, enhancing reusability in web applications, though with noted limitations on path resolution.
Explicitly states that 'All other features of ejs' are not supported, which can hinder projects relying on advanced EJS capabilities like custom delimiters or plugins.
The include function resolves paths relative to the executed TypeScript file, not the template file, which is counter-intuitive and the README admits it may change, causing instability.
While compile() allows caching, the implementation is minimal and lacks advanced performance optimizations found in more mature templating engines.