Open zslabs opened 8 years ago
Thanks for the suggestion! I'll add it asap.
For the time being, I think you should just be able to call the plugin multiple times using the JS API. If you're using config files, that won't help though.
I know this is a separate concern, but do you know how to loop through and add-in all of the helpers from that repo automatically? I'd rather not specifically create each one over and just have them available to me.
SInce they're in a single directory, you can probably just pass that directory to this plugin, no? If not, you can use a module such as globule to locate the source files and then pass those to this plugin.
That's also basically what I had in mind for this plugin. I'd add an option called files
that accepts an array of wildcard patterns. An example config would look like:
{
files: ['src/helpers/**/*.js', 'node_modules/handlebars-helpers/lib/helpers/*.js']
}
The directory
option would still apply: every file pattern would be relative to that directory, if provided.
Cool thanks!
I'm gonna keep this issue open so I can track the new feature I described. :-)
you can add "handlebars-helpers" to the current handlebars instance...
import handlebars from 'handlebars';
import handlebarsHelpers from 'handlebars-helpers';
// Register handlebars-helpers library
handlebarsHelpers({ handlebars });
now I can use them in metalsmith.
Hi, Thanks so much for this package! Can it accept multiple directories? The reason I'm asking is because I'd love to bundle both https://github.com/assemble/handlebars-helpers and my own. Thanks!