|
| 1 | +{{- $tasks := (ds "tasks").tasks -}} |
| 2 | +# Taskfile Workflow Diagram |
| 3 | + |
| 4 | +This diagram visualizes the dependencies and flow between tasks defined in `Taskfile.yml` : |
| 5 | + |
| 6 | +```mermaid |
| 7 | +graph TD |
| 8 | + {{- range $name, $_ := $tasks }} |
| 9 | + {{- if eq $name "default" }} |
| 10 | + default["**default**"]:::defaultNode |
| 11 | + {{- else }} |
| 12 | + {{ $name }}[{{ $name }}] |
| 13 | + {{- end }} |
| 14 | + {{- end }} |
| 15 | + |
| 16 | + {{- range $name, $task := $tasks }} |
| 17 | + {{- if (has $task "deps") }} |
| 18 | + {{- range $dep := $task.deps }} |
| 19 | + {{ $name }} -- deps --> {{ $dep }} |
| 20 | + {{- end }} |
| 21 | + {{- end }} |
| 22 | + {{- if and (eq $name "default") (has $task "cmds") }} |
| 23 | + {{- range $cmd := $task.cmds }} |
| 24 | + {{- if (strings.HasPrefix $cmd "task ") }} |
| 25 | + {{- $dep := (strings.TrimPrefix "task " $cmd) }} |
| 26 | + default -- deps --> {{ $dep }} |
| 27 | + {{- end }} |
| 28 | + {{- end }} |
| 29 | + {{- end }} |
| 30 | + {{- end }} |
| 31 | + |
| 32 | + classDef defaultNode fill:#1976D2,color:#fff,stroke:#333,stroke-width:2px; |
| 33 | +``` |
| 34 | + |
| 35 | + |
| 36 | +## Task Goals and Descriptions |
| 37 | + |
| 38 | +| Task Name | Description | |
| 39 | +|-------------- |---------------------------------------------------------------------------------------------------| |
| 40 | +{{- range $name, $task := $tasks }} |
| 41 | +| {{ $name }} | {{ $task.desc }} | |
| 42 | +{{- end }} |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +Copy and paste the Mermaid code into a Markdown viewer that supports Mermaid to see the graph rendered visually. |
0 commit comments