shawnbot / meta-template

:sparkles: Automagically convert Nunjucks templates into a variety of other formats!
52 stars 9 forks source link

Abstract formatting helpers, format updates #2

Closed shawnbot closed 7 years ago

shawnbot commented 7 years ago

The bulk of this update is a new collection of "abstract" formatting helpers in format/abstract.js, which does not export a format that can be extended, but instead provides functions and constants that should be useful in lots of different outputs. The goal here was to avoid going any further down the inheritance hole with the Nunjucks format serving as the base "class" for all others. Instead, what we have now is a collection of functions (and values, such as useful regular expressions) that each format can use as it sees fit.

I also fixed up the PHP format and started working on a new Handlebars one for shits and giggles. There are no tests for formats other than Nunjucks yet. 😢