Hacker News new | past | comments | ask | show | jobs | submit login

There have been times I've wanted to templatize my configuration but I don't want to do it with text-based templates but templates within the configuration files syntax (be it yaml, toml, or something else). Not sure what this is called, I've been calling it "structural templating".

So far the only things close to this are

- Azure pipeline's syntax: https://docs.microsoft.com/en-us/azure/devops/pipelines/proc... - Something called Jasonette: https://docs.jasonette.com/templates/ - Something called Jsonnet: https://jsonnet.org/

Azure Pipeline's approach I think is closest to what I've been looking for.

Anything else in this space?




I prefer https://github.com/taskcluster/json-e

Has the advantage/disadvantage that it's still valid json/yaml

I wrote a scary command line wrapper for it:

https://wryun.github.io/rjsone/

Has libs for Python, Go, and JS, and there's a bazel interface.


This looks really nice. I'll have to give this a try at some point to see how I feel about it vs Azure Pipelines. From my quick look, this looks more general purpose at the cost of more verbosity.


plug for json-e i found it much less painful-looking than jsonnet





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: