I'm investigating the various JS templating frameworks to use for a Mobile First RWD.<p>The reason I want to use this is because this is within a corporate environment. It makes sense to use something that requires very little setup and is already supported by modern browsers. I also don't have access to database or JSON strings so everything must be stored locally and versioned through something like Git.<p>I'd love to go full-blown with a MVC framework but at this point it's overkill and I'm still a complete newb. This will serve as a prototype, mostly a proof of concept when it's finished. My main needs would be for templating common elements, like header, footer, content areas, etc.<p>If I can do something fast enough, I might be able to use this as a way to convince the overlords of the company to ditch trying to go with a CMS like CQ5, Teamsite, or another Java based system.
There is a Twig port in js: <a href="https://github.com/justjohn/twig.js/wiki" rel="nofollow">https://github.com/justjohn/twig.js/wiki</a> that i've had some luck experimenting with. It doesn't support macros yet but given that it's in javascript I don't see why it should.<p>Also (and I hope I don't get downvoted because this is ugly) I <i>have</i> made basic templates work using ajax and this sprintf for js (<a href="http://www.diveintojavascript.com/projects/javascript-sprintf" rel="nofollow">http://www.diveintojavascript.com/projects/javascript-sprint...</a>) but that may be far more basic than your environment would accept.