Closed ericf closed 9 years ago
One more request, {{@ExpressHandlebars.*}}
is really verbose.. could you make the name a bit shorter? Maybe something like exphbs
since that acronym is used elsewhere?
It's not a huge deal, maybe you could just make that property name configurable?
One more request,
{{@ExpressHandlebars.*}}
is really verbose.. could you make the name a bit shorter? Maybe something likeexphbs
since that acronym is used elsewhere?
Yeah it is, I'll sleep on it. exphbs
seems like the top candidate.
It's not a huge deal, maybe you could just make that property name configurable?
I'd rather not add an option for this but instead keep it fixed, at least for now. So if the reason you want it configurable is to have a shorter name, I'd rather just change the name before I cut the release :smile:
Thanks!
Yeah, I just wanted the shorter name. Not to mention, having it capitalized like that just sticks out like a sore thumb in the apps I write. :P
I will be merging this in the next couple of days, so if anyone has feedback let me know.
any timeline when it'll be merged to master? :)
@adon-at-work I hope to find time to finish this by updating the README docs and publishing to npm today.
OK. Thanks.
Released as v2.0.0
.
This upgrades to Handlebars 3.0 and makes backwards-incompatible changes to the ExpressHandlebars API. Since Handlebars had a major version bump, it seemed appropriate for this package to have a major version bump as well, so I took the liberty of refactoring some things.
compilerOptions
config property which is passed along toHandlebars.compile()
andprecompile()
.data
channel during render (#101). This metadata is accessibile via{{@exphbs.*}}
_compileTemplate()
_precompileTemplate()
_renderTemplate()
For most apps this will be a drop-in replacement to v1 of this package, and using Handlebars 3.0 should be a drop-in replacement as well. That said, here's the changes that potentially break back-compat:
prototype
props for default config values.handlebarsVersion
from instances andgetHandlebarsSemver
static function on theExpressHandlebars
constructor.compileTemplate()
hook with the protected but supported_compileTemplate()
and_precompileTemplate()
hooks.