michaeldfallen/sbt-mustache — pull request #2 by michaeldfallen (2014-08-08 10:35:07+00:00)
Title: Added support for play content types

This adds native support for Play Frameworks [custom content types](http://www.playframework.com/documentation/2.3.x/ScalaCustomTemplateFormat). We do this by generating a trait into `source_managed` that provides the implicit `Writeable` and `ContentType` that play Results need to render arbitrary types as HTML.

To use this simply set `MustacheKeys.playSupport` setting to true in your build.sbt:

```
lazy val root = (project in file("."))
.enablePlugins(PlayScala)
.settings(MustacheKeys.playSupport := true)
```

Assuming you have a Presenter in `views.Foo`:

```
package views

case class Foo() extends mustache.foo
```

Then mix in the `PlayImplicits` trait in your controller:

```
import io.michaelallen.mustache.PlayImplicits

object MyController extends Controller with PlayImplicits {
def index = Ok(views.Foo())
}
```