michaeldfallen/sbt-mustache — pull request #4 by michaeldfallen (2014-08-15 14:51:55+00:00)
Title: Support for register to vote

This includes changes required to use sbt-mustache on [Register to Vote](https://www.gov.uk/transformation/register-to-vote). I'm using it as an example of a large project to prove the plugin does it's job well.

All changes in this are specific to any play apps, not just Register to Vote in particular. Designing an API by one apps usage pattern is obviously a bad idea.

Changes include:

- Ability to render both `.html` and `.mustache` files in the mustache folder
- Moved template file copying into it's own Scala file and included timings
- Logging (always good)
- Included a hash of the mustache template in the generated Object (so scala will recompile the object when the template changes) to support the hit refresh workflow of Play apps
- Use both `getClass.getResourceAsStream` and `getClass.getClassloader.getResourceAsStream` to ensure we can load resources from a build source jar
- Added sbt scripted tests to prove Play integration