0.1.0 • Published 12 years ago

hoganyam v0.1.0

Weekly downloads
16
License
-
Repository
github
Last release
12 years ago

hoganyam

Yet another hogan.js(moustache templates) middleware. Can render templates with partials serverside or precompile them for use on the client. The templates are compiled, cached and updated when the file changes.

Usage

    var hoganyam = require('hoganyam');

As connect-style middleware

    app.use(hoganyam.provide(templatesDir, options))

Serverside rendering

    hoganyam.render(file, context, options, function(err, str) {
        // do something with the rendered template string
    });

Use as broadway plugin for flatiron

    app.use(hoganyam.plugin, {dir: viewsDir, ext: '.html'});
    // now you can render directly to the response
    app.render(res, 'templatename', { title: 'Hello Hogan'});

For options see source

License

MIT License

Install with npm

npm install hoganyam

Run tests

npm test
0.1.0

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago

0.0.0

12 years ago