playframework / playframework/twirl
Extension fallback
Open
Nobody has claimed this yet.
status:backlog
- Dominant language
- Scala
- Stars
- 561
- Forks
- 118
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 29
Description
I think it is useful to add extension fallback feature to SbtTwirl.
It will work as follows.
- If you have set
formatFallback: SettingKey[Option[String]]and template's extension does not match any intemplateFormats, thenformatFallbackwill be used.
(formatFallbackwill be Some("play.twirl.api.TxtFormat"))
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the SbtTwirl code that matches template extensions against templateFormats and handles format settings. Verify the requested behavior for an unmatched extension: when formatFallback is configured, it should be used, including the stated TxtFormat value; add or update tests if the relevant test entry point is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100