cloudcmd/modules/rendy/README.md
2015-05-21 09:33:25 -04:00

1.7 KiB

Rendy License NPM version Dependency Status Build Status

Simple template engine compatible with handlebars and mustache.

Install

NPM_INFO

npm i rendy --save

How to use?

Rendy could be used in browser or node.

Browser version:

<script src="rendy.js"></script>
<script>
    var Tmpl    = 'hello {{ where }}';
        result  = rendy(Tmpl, {
            where: 'in browser'
        });
        // returns
        'hello in browser'
</script>

Node version:

var rendy   = require('rendy'),
    Tmpl    = 'hello {{ who }}';
    result  = rendy(Tmpl, {
        who: 'world'
    });
    // returns
    'hello world'

License

MIT