From c9cd68515648532d8234f9540740c9576c00e0cc Mon Sep 17 00:00:00 2001 From: Luca Lanziani Date: Mon, 18 Apr 2022 11:28:55 +0200 Subject: [PATCH] feat: move flow example up in the Readme --- README.md | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index cd93b0b..46cdd9a 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,19 @@ Template your files This a tool/library born from the necessity of templating multiple files and pushing them in multiple locations. +# The flow + +![The flow](examples/flow.gif) + +0. run `tp generate [context-selector]` +1. interpolates _Mapping_ and the _selected context_ to generate a **rendered mapping** +2. Interpolates **rendered mapping** with the _selected context_ to get a contexts for each templates +3. Interpolates _Template A_ with its context to get **rendered Template A** +4. Interpolates _Template B_ with its context to get **rendered Template B** +5. Using the destinations in **rendered mapping** and **rendered Template A** and **rendered Template B** generates a github PR + +I know it is confusing, you might want to check out the examples + # Quick start ```bash @@ -463,20 +476,6 @@ Options: --templates-dir directory where to find the templates [string] [default: "templates"] ``` -# The flow - -![The flow](examples/flow.gif) - -0. run `tp generate [context-selector]` -1. interpolates _Mapping_ and the _selected context_ to generate a __rendered mapping__ -2. Interpolates __rendered mapping__ with the _selected context_ to get a contexts for each templates -3. Interpolates _Template A_ with its context to get __rendered Template A__ -4. Interpolates _Template B_ with its context to get __rendered Template B__ -5. Using the destinations in __rendered mapping__ and __rendered Template A__ and __rendered Template B__ generates a github PR - -I know it is confusing, you might want to check out the examples - - # Terminology ## Context