koajs / ejs

a koa view render middleware, support all feature of ejs
MIT License
248 stars 57 forks source link

add '(templateName: string) => Promise<string>' overload to settings.root #57

Closed Reeywhaar closed 2 years ago

Reeywhaar commented 4 years ago

POC for https://github.com/koajs/ejs/issues/56

If you interested I can add tests and so on. I am myself not sure of api yet. Maybe I should leave root as is, and add one additional option getTemplate which if defined will receive fullpath of template, i.e root + view + ext