Skip to content

Conversation

@mrdziuban
Copy link
Contributor

This aims to bring the twirl module closer to parity with the twirl SBT plugin. It adds support for:

  • Overriding full set of twirl template imports rather than just appending additional imports onto the default set
    • Renames twirlAdditionalImports to twirlImports
    • Sets the default value to play.japi.twirl.compiler.TwirlCompiler.DEFAULT_IMPORTS
  • Overriding set of twirl extensions/formats that will be compiled
    • Adds def twirlFormats: T[Map[String, String]] to define a mapping from extension to class name
    • Sets the default value to
      Map(
        "html" -> "play.twirl.api.HtmlFormat",
        "xml" -> "play.twirl.api.XmlFormat",
        "js" -> "play.twirl.api.JavaScriptFormat",
        "txt" -> "play.twirl.api.TxtFormat")

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Can you please also update the documentation.

@mrdziuban
Copy link
Contributor Author

Updated!

@mrdziuban
Copy link
Contributor Author

Let me know if there's anything I can do to fix the CI failures (fatal: 32244f1de... is not a valid 'commit' object)

@lefou
Copy link
Member

lefou commented Aug 31, 2020

CI is ok. I've ran a separate job on my account: https://travis-ci.org/github/lefou/mill/builds/722758542

@lefou lefou merged commit bbbf193 into com-lihaoyi:master Aug 31, 2020
@lefou
Copy link
Member

lefou commented Aug 31, 2020

Thank you very much!

@lefou lefou added this to the after 0.8.0 milestone Aug 31, 2020
@mrdziuban mrdziuban deleted the twirl-updates branch August 31, 2020 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants