| 1 |
{{ range $i, $e := .Scripts -}} |
| 2 |
{{ if eq .Export "*" }} |
| 3 |
{{- printf "import %s as Script%d from %q;" .Export $i .Import -}} |
| 4 |
{{ else -}} |
| 5 |
{{- printf "import { %s as Script%d } from %q;" .Export $i .Import -}} |
| 6 |
{{ end -}} |
| 7 |
{{ end -}} |
| 8 |
{{ range $i, $e := .Runners }} |
| 9 |
{{- printf "import { %s as Run%d } from %q;" .Export $i .Import -}} |
| 10 |
{{ end -}} |
| 11 |
{{ if .Runners -}} |
| 12 |
let group = { id: "{{ $.ID }}", scripts: [] } |
| 13 |
{{ range $i, $e := .Scripts -}} |
| 14 |
group.scripts.push({{ .RunnerJSON $i }}); |
| 15 |
{{ end -}} |
| 16 |
{{ range $i, $e := .Runners -}} |
| 17 |
{{ $id := printf "Run%d" $i }} |
| 18 |
{{ $id }}(group); |
| 19 |
{{ end -}} |
| 20 |
{{ end -}} |