-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create an encapsulated "Dust template" class #516
Comments
It sure would be nice to make a way to compile a template to a CommonJS format so just require(xxx.dust) would work |
I agree-- what form would the required object take? Would it have a |
why not follow the proposal already in #330? seems like the pull request was blocked due to conflicts, but it looks like a good implementation |
Agreed with @pixshatterer that #330 seems to be doing the same thing. |
This is actually not about treating templates as modules. It's the need to 330 is not related but it's still no less nice to have.
|
#330 is related because when you In order to make a require handler that did not depend on subsequently calling the dust global, I had to attach ad-hoc |
Dust templates currently compile to a set of functions that are invoked via
body_0
being registered bydust.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.The text was updated successfully, but these errors were encountered: