I'm asking because I have a middleware that needs to dynamically detect a bunch of files and possibly concat them depending on the context, and most of the time I end up with the raw HTML instead of a file for swig to render. Adding this allows me to pass in the raw HTML into render() instead of expecting it to read from a file, which makes my life 1000% easier.
I can submit a pull request later tonight if you guys are fine with it.
This might sound like a weird request, but do you think if it is possible to allow an option to render with
swig.render
instead ofswig.renderFile
in https://github.com/koa-modules/koa-swig/blob/master/index.js#L43?I'm asking because I have a middleware that needs to dynamically detect a bunch of files and possibly concat them depending on the context, and most of the time I end up with the raw HTML instead of a file for swig to render. Adding this allows me to pass in the raw HTML into render() instead of expecting it to read from a file, which makes my life 1000% easier.
I can submit a pull request later tonight if you guys are fine with it.