DoT

doT.js or simply doT is a FOSS templating engine built in JavaScript. .dot files compile to JavaScript functions, .def files are for inclusion in other templates, and .jst files compile into .js files.