Hello,
I've read the brief usage guide for sbt-scalate-precmpiler, but looks like there no answer on my questions.
Is it possible to use the plugin in order to precompile templates before running unit tests?
I use SBT for dependency and build management of the multi module project.
I tried to apply the plugin to the module which implements email functionality, but it does not work as expected.
So what I did?
Add addSbtPlugin("org.scalatra.scalate" % "sbt-scalate-precompiler" % "1.8.0.1") to the plugins.sbt
Add following setting to the email module:
lazy val email = project.in(file("email"))
.settings(name := "email")
.settings(Common.settings)
.settings(libraryDependencies ++= Dependencies.emailDependencies ++ Dependencies.testDependencies)
.enablePlugins(JavaAppPackaging)
.settings(
scalateTemplateConfig in Compile <<= (sourceDirectory in Compile) { base =>
Seq(
TemplateConfig(
base / "resources" / "templates", // I store mustache templates under
email/src/main/resources/tempaltes
Nil,
Nil)
)
}
)
When I run a unit test which involves email module, I still see that the templates compile in runtime.
What should I do in order to force the plugin work as expected?
Hello, I've read the brief usage guide for sbt-scalate-precmpiler, but looks like there no answer on my questions. Is it possible to use the plugin in order to precompile templates before running unit tests? I use SBT for dependency and build management of the multi module project. I tried to apply the plugin to the module which implements email functionality, but it does not work as expected.
So what I did?
Add
addSbtPlugin("org.scalatra.scalate" % "sbt-scalate-precompiler" % "1.8.0.1")
to the plugins.sbtAdd following setting to the email module:
When I run a unit test which involves email module, I still see that the templates compile in runtime.
What should I do in order to force the plugin work as expected?
Thanks