Actually it’s a version of Google Closure Templates (.soy templates) with HAML syntax.
Why you need this?
Hsoy Templates gives you a way to write such templates just once, and use it on client-side, and on backend.
- one template (a *.hsoy file)
- HAML syntax (accelerates and simplifies template creation – see http://haml.info/)
- compiled into Java (can be reused from any JVM based language)
- based on Google Closure Templates library
- Apache 2.0 licence
- maven-hsoy-templates – a Maven plugin
- compile into JS/Java on compile phase
- recompile into JS after each modification (watching for changes)
- grails-hsoy-templates – a Grails plugin, as a Resource Plugin extension (http://grails.org/plugin/hsoy-templates)
- test test test
- support all Google Closure Templates features
- JSP taglib
- native OS listener of sources modification (for Maven plugin)
- a Gradle plugin
Take a look at examples of Haml syntax at http://haml.info/tutorial.html (skip ERB parts)
and use it
As a result you’ll get
Same HTML on server and client side, generated from same template file.
Currently it consists of following parts: