twitter/hogan.js — pull request #22 by kasperp (2012-01-05 21:38:37+00:00)
Title: A more Windows friendly compile script

Some suggestions to the compile script, that adds following functionality which makes my life on Windows a little easier.

As Windows doesn't support shell wildcard expansion, the script supports an option (-td) for specifying a directory to load template files from. (http://blogs.msdn.com/b/dancre/archive/2005/05/14/417547.aspx)

Many editors in Windows add a Byte Order Mark to UTF-8 encoded files (http://en.wikipedia.org/wiki/Byte_order_mark). This caused the compiled templates to include the Byte Order Mark when the templates were rendered. The script will remove the Byte Order Mark if present. I'm not sure that I did that the right way or if the Node.js file api support this in some way (please enlighten me).

I also added an option for specifying the file extension of the template files.

The script can be used like this:
``hogan-compile.js (-td ) (-ext ) template files
example: hogan-compile.js templates/*.mustache
example: hogan-compile.js -td templates
``

When the -td option is used any "template files" are ignored