Create an encapsulated "Dust template" class
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 461
- PR merge metrics
- No merged PRs in 30d
Description
Dust templates currently compile to a set of functions that are invoked via `body_0` being registered by `dust.register`.
In #513 we suggest that these body functions could be members of a "Body" class so that we don't have to set magic flags on them to distinguish them from regular functions. In addition, `.render()` methods could be part of the class instead of invoking the function directly, etc.
Contributor guide
No contributing guide indexed for this repository
Research direction
Read issue #513 first, then trace how Dust templates compile body_0 functions and how dust.register invokes them. The work is done when template bodies are encapsulated by a Body class and rendering uses class methods rather than magic flags or direct function invocation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100