Rogain
Rogain is a templating library that parses HTML-like templates into JSON compatible trees and provides tools for rendering on the server and browser.
Templates
Rogain provides a templating language that uses case-sensitive HTML and single curly brackets, block helpers and component composition.
{title} {@thing.title} {@thing.contents}
Rogain.Config
Creates a Config instance to manage components, helpers and filters use by rogain.
var config = helpers: Pass: components: Heading: filters: ;
Further documentation on the Config class can be found in the rogain-config module.
Rogain.Parser
var parser = config;
parse(template)
fs ;
Further documentation can be found in the rogain-parser module.
Rendering
renderToString(tree, data, config)
;; documentbodyinnerHTML = Rogain;
Further documentation can be found in the rogain-render-string module.
Utilities
Documentation can be found in the rogain-utils module.
Tree Utilities
Documentation can be found in the rogain-tree-utils module.