michaeldfallen/sbt-mustache — pull request #1 by michaeldfallen (2014-08-06 10:35:13+00:00)
Title: Template generation

This completes items 1 and 2 on the To Do list in the readme: *Generate objects to store compiled mustaches* and *Generate template traits to make rendering templates easy*.

With this if you have a template sitting at `src/main/mustache/foo.mustache` then a template trait will be generated in `mustache.foo` which you can extend:

`mustache/foo.mustache`:
```

{{page_title}}

```

Presenter code:
```
case class Foo(
page_title:String
//other model parameters
) extends mustache.foo

Foo(page_title = "Rendered by Mustache").render
```

Rendered output:
```

Rendered by Mustache

```

Easy.