doT.js is fast, small and has no dependencies.
custom delimiters runtime evaluation runtime interpolation compile-time evaluation partials support conditionals support array iterators encoding control whitespace - strip or preserve streaming friendly use it as logic-less or with logic, it is up to you
http://olado.github.com/doT (todo: update docs with new features added in version 1.0.0)
var dots = ;
This will compile .def, .dot, .jst files found under the specified path. Details
var dots = ;dots;
The above snippet will: * Compile all templates in views folder (.dot, .def, .jst) * Place .js files compiled from .jst templates into the same folder These files can be used with require, i.e. require("./views/mytemplate") * Return an object with functions compiled from .dot templates as its properties * Render mytemplate template
./bin/dot-packer -s examples/views -d out/views
Many people are using doT with express. I added an example of the best way of doing it examples/express:
doU.js is here only so that legacy external tests do not break. Use doT.js. doT.js with doT.templateSettings.append=false provides the same performance as doU.js.
Laura Doktorova @olado
doT is licensed under the MIT License. (See LICENSE-DOT)
Thank you @KevinKirchner for the logo.