mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Add js.Batch
Fixes #12626 Closes #7499 Closes #9978 Closes #12879 Closes #13113 Fixes #13116
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{{ range $i, $e := .Scripts -}}
|
||||
{{ printf "import { %s as Script%d } from %q;" .Export $i .Import }}
|
||||
{{ end -}}
|
||||
{{ range $i, $e := .Runners }}
|
||||
{{ printf "import { %s as Run%d } from %q;" .Export $i .Import }}
|
||||
{{ end }}
|
||||
{{/* */}}
|
||||
let scripts = [];
|
||||
{{ range $i, $e := .Scripts -}}
|
||||
scripts.push({{ .RunnerJSON $i }});
|
||||
{{ end -}}
|
||||
{{/* */}}
|
||||
{{ range $i, $e := .Runners }}
|
||||
{{ $id := printf "Run%d" $i }}
|
||||
{{ $id }}(scripts);
|
||||
{{ end }}
|
Reference in New Issue
Block a user