handlebars-loader
handlebars-loader copied to clipboard
Simulate loader behavior in Node.js environment
Thanks for you awesome loader! I am using this and really like how it loads helpers and partials. Unfortunately, it is not supported in raw Handlebars, but I'd like to run my templates with Node as well.
Node.js module system also allows writing custom loaders to require.extensions
object. I wrote this one and I'd like to share it with you:
https://gist.github.com/just-boris/ea02ff33b09d6ce3b492
This code makes Handlebars in Node.js behave as well in your loader and allows to use relative paths to helpers and partials. I guess some people here might find this useful for them as well as me.