Basic template engine for Node.js based on template string.
The goal is to make a template string where you can change the front-end css without changing logic's code, and meanwhile having all intellisense Typescript offers.
npm install template-string-render --save
In case you're using typescript
import * as tsr from "template-string-render" console.log(tsr.p("Hello world"));
var str = require("template-string-render"); console.log(tsr.p("Hello world"));
If you want to see how a simple page looks like
npm run liveServerExampleSimple
And to finalise, if you're interested in benchmarking this template engine, i made a little benchmark comparing some templates to template-string
npm run benchmark
Template string vs swig vs jade (all are compiled)
starting to render 100000 templates! template-string (100000) = 188ms swig (100000) = 707ms jade (100000) = 588ms
Benchmarks are located on test/benchmark.