Skip to content

Commit

Permalink
feat: move flow example up in the Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaLanziani committed Apr 18, 2022
1 parent 769e246 commit c9cd685
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <mapping> [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
Expand Down Expand Up @@ -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 <mapping> [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
Expand Down

0 comments on commit c9cd685

Please sign in to comment.