Preprocessing of sbt-twirl templates
Asked Answered
P

1

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?

Prothallus answered 23/5, 2015 at 9:25 Comment(1)
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.Prothallus
O
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.

Ossification answered 31/5, 2015 at 0:21 Comment(1)
Interestring. I'll try to use the same idea.Prothallus

© 2022 - 2024 — McMap. All rights reserved.