jasonmoo / t.js

A tiny javascript templating framework in ~400 bytes gzipped
MIT License
825 stars 88 forks source link

adding support for AMD, CommonJs or global browser space #16

Open tarnowsc opened 8 years ago

tarnowsc commented 8 years ago

this leaves the global t variable when using the normal way but allows to use as a proper reqire.js module i.e.

define(["t"], function (t) {
    return (new t("{{=data}}")).render({data: 'myData'});
}