mjst - Micro JavaScript Template Engine
This is the content I've written so far in the official mjst repository . I'd love to know your thoughts about this little experiment, cheers! What mjst is a lightweight, about 1Kb minified and gzipped, and performances focused template engine with standards support. There are dozens JavaScript ? Template Engines solutions out there but as far as I know this is the only one based on validation for both client and server side programming languages. How There is one single function to call: // via text (e.g. Ajax or innerHTML from a template node) var transformed = mjst ( '<?js var hello = "mjst!"; ?><js-hello/>' ); // classic template node example < script id = "mytpl" type = "text/html" > <? js var hello = "mjst!" ; ?> < js - hello /> < /script> myEl.innerHTML = mjst(document.getElementById("mytpl")); / / via XML ( e . g . Ajax or a created document ) // this is a ...