-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
helper factories #25
Comments
@shannonmoeller I might need a little more perspective on use-case to understand what you're asking for. In particular, we wanted to move away from the This pattern isn't really idiomatic for assemble 0.6.0, users won't be be able to use the register method with assemble once the handlebars-helpers updates are merged to master. also, #6 was resolved already, but possibly not by being able to add the options directly to the |
It's a recommendation for a solution to this pattern that doesn't involve explicitly requiring var assemble = require('assemble');
var engine = require('engine-assemble');
var layouts = require('handlebars-layouts');
assemble.engine('hbs', engine);
assemble.helpers(layouts(engine.Handlebars)); With the proposed pattern, the above becomes: var assemble = require('assemble');
var layouts = require('handlebars-layouts');
assemble.helpers({ factory: true }, layouts); |
I noticed you closed and locked the related issue. You are aware that this is a feature request, and not a bug, correct? |
Yep! Sorry about the lock. Habit. That said, I'm not sure that |
okay, just making sure. I'm still mulling this over, there might be a different approach. |
Sounds good! Thanks! |
@shannonmoeller we completely refactored this lib (and moved it to |
I definitely want to make sure that my plugins remain compatible with template and assemble. |
There is a need to have
template
(and thereby Assemble and Verb) optionally provide the rendering engine to helper modules. Several existing helpers expect this behavior already:.register()
helpersI'd love to see an update to the
.helper
and.helpers
methods to support this. Off the top of my head, perhaps something like the following:This would also provide a helper-specific solution to #6:
The text was updated successfully, but these errors were encountered: