Skip to content

Commit

Permalink
Callbacks => Runners etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Oct 19, 2024
1 parent 7545e08 commit 1a8c645
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 111 deletions.
17 changes: 0 additions & 17 deletions tpl/js/batch-esm-callback.gotmpl

This file was deleted.

16 changes: 16 additions & 0 deletions tpl/js/batch-esm-runner.gotmpl
Original file line number Diff line number Diff line change
@@ -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 }}
Loading

0 comments on commit 1a8c645

Please sign in to comment.