Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 825 Bytes

README.md

File metadata and controls

34 lines (22 loc) · 825 Bytes

chintz-node

Chintz client for Node.js

NPM

Usage

This assumes you have a Chintz library of front end elements (mustache templates, css, js, etc. with a dependency manifest per-component).

Initialise:

var Chintz = require("chintz-node");
var chintz = new Chintz("/absolute/path/to/chintz/library");

Prepare elements:

chintz->prepare('element-name');

Render content:

chintz->render('element-name', { data: 'value' }, function(s) { sys.log('rendered content: ' + s); });

Resolve dependencies:

chintz->getDependencies('dependency_key', function(d) { sys.log('dependencies: ' + d); });