8

I need to preprocess some Twirl templates in my sbt project. Is it possible to define a task in build.sbt that will run before Twirl plugin compiles its templates?

tilex
  • 1,644
  • 1
  • 17
  • 32
  • If I define my custom source generator it is executed in parallel with Twirl generator, not before or after. I haven't found a way to make one source generator dependent on another one. – tilex May 28 '15 at 11:45

1 Answers1

0

sbt-web allows the sequencing of the asset pipeline through pipelineStages:

pipelineStages := Seq(myPreProcessorTask, myTwirlTask)

Documentation: Writing an Asset Pipeline task

Source on GitHub.

bjfletcher
  • 9,975
  • 3
  • 44
  • 64