 -}}

{{- /* check for dict */ -}}
{{- if reflect.IsMap . -}}
  {{- with .src -}}
    {{- $src = . -}}
  {{- else -}}
    {{- errorf "as you are providing params as a dict, you must provide the source file as .src" -}}
  {{- end -}}
  {{- with .load -}}
    {{- $loadOpts := slice "async" "defer" -}}
    {{- if not (in $loadOpts . ) -}}
      {{- errorf "Invalid .load %q for file /assets/%s - valid options are %s." . $src (delimit $loadOpts ", " " and " ) -}}
    {{- end -}}
    {{- $load = . }}
  {{- end -}