Skip to content

feat: partial template support

This patch adds TypeScript to renderTemplate and supports Mustache partials. To my knowledge, there was no way to use Mustache partials with mustache-loader due to the precompilation that takes place. Partials seem to only work during runtime, not build time.

So, in order to support partials, I am now treating filename.partial.mustache files as strings once imported (this is done through the raw-loader in webpack).

I wrote a unit test that attempts to render a partial, but it doesn't work. I forgot that the unit tests do not use Webpack, so I would need to write a mock for Hogan templates that support partials. For now, I'll set it as skip.

This patch also changes the parameters of renderTemplate. I am passing an object now because the previous parameter list was getting too long.

  • fix: remove file not meant to be committed

  • test: write and skip partial test

  • feat: load partials with webpack

  • refactor: use new renderTemplate interface

  • feat: add renderTemplate partial support and convert to typescript

Edited by Olivier Goulet

Merge request reports