npm.io
0.9.1 • Published 4 years ago

ejstmpl

Licence
ISC
Version
0.9.1
Deps
1
Size
14 kB
Vulns
0
Weekly
0

EJS Template Engine

const EJSTmpl = require('ejstmpl');

// Define template search root
EJSTmpl.search_root = `${__dirname}/tmpl`;


// Init templates
const b = EJSTmpl.init('/b/b.html');
const tmpl = EJSTmpl.init('/a.html');

// Render template
console.log(tmpl.render({view:b.prepare({MSG:"HI"})}), "\n");

// Release all caches
EJSTmpl.release();

Keywords