simpleT is a simple template engine for Node.JS and web browsers that has some special features:
- Simple structure with minimum configuration
- Embedded JavaScript support
- Client-side support
- High performance
- Customizable code delimiters
- Global values injection
- Dynamic caching
- Includes
- Result without redundant whitespace
npm install simplet
varsimplet=require('simplet');varengine=simplet();// Create the templateengine.template('template.ejs','Hello, <% print(name) %>');// Render the templateengine.render('template.ejs',{name: 'simpleT'});//=> Hello, simpleT// Remove the templateengine.clear('template.ejs');- code tag
<% code %> - print tag
<%- data %>or<% print(data) %> - print tag with XML escape
<%= data %>or<% printx(data) %> - include tag
<%@ template %>or<% include(template) %> - comment tag
<%# code %>
