A drop in single file solution for templating with Variable Precedence

Jinja2++

Jinja2++ is a drop in single file solution for templating with Variable Precedence.

You can use ANY language!

How it works

Based on the Unix pipeline : JSON - stdin |> stdout - JSON

A var_file is any executable that slurps JSON from STDIN, and spits JSON from STD out.

We assemble a series of cascading var_files based on the file hierarchy to overwrite proceeding variables.

We also do context injection, in the same fashion, ie context as the local path of each var_file / template, etc

Features

Variable precedence

src
|── vars.perl* <- [[base variables]] ├── filters.py* <- inject ((J2 filters)) with ~vanilla python~ functions! ... ├── render_inject.rb* <- inject && overwrite [pre-render context] variables ├── var_inject.sh* <- inject && overwrite [pre-script context]    

 

To finish reading, please visit source site