If you are using Node.js with Hogan.js you want to compile your templates on the server.
With Node.js you can create a route which looks like this:
Include it like: <script src=’templates’ type=’text/javascript’></script>
Templates are in the T namespace and can be renderered like this:

I adapted this for javascript rather than coffeescript. It’s up at https://github.com/lukegalea/express-hogan-precompile-boilerplate
I adapted this into a grunt.js task. It’s a bit different as I wanted to use paths to template files with wildcards, and grunt has a few utils to help with this; also I found the default hogan exception needs augmented with the name of the template, since you can’t tell where it is in the loop. (it’d be nice to have line/col numbers too):
To use, you’d define a task something like this:
Great, thanks for sharing!