SBT plugin for Google Closure Templates
This plugin is designed for using Google Closure Templates with SBT 0.12+
- Clone repo
- Cd into sbt-closure-templates directory
- Add this plugin to your application as a dependency:
"com.kinja.sbt" %% "sbt-closure-templates" % "0.1-SNAPSHOT"
Import the plugin
Add the settings:
resourceGenerators in Compile <+= SoyKeys.soyCompiler in Compile
The default dictionary file pattern is
How it works?
When plugin starts it recursively collect all files with .soy ending from your application's view directory - the default is
/closure_templates.txt resource. So, you can use this file as a list of available templates. Which is useful because we cannot find files in a jar package. For example our play2-closure Play! plugin using that file, too.