5 ms·
I'd rephrase the question: "Why are we templating YAML with text-based templating tools?" I and @akx wrote a templating tool called Emrichen that's specificall
by ssspaju 8y ago
I'd rephrase the question: "Why are we templating YAML with text-based templating tools?"
I and @akx wrote a templating tool called Emrichen that's specifically designed for producing YAML and JSON from YAML templates:
https://github.com/con2/emrichen https://github.com/con2/emrichen
In contrast to other template systems, Emrichen templates are not just "based on YAML", they _are_ YAML. YAML tags like "!Var varname" are used to perform things like variable substitution, loops etc. Variables can be of any JSON type, not just strings, and the template is evaluated top–down.