2022-09-11 11:14:54 +08:00
|
|
|
{{/* Use to get resources path with vendor */}}
|
|
|
|
|
|
|
|
{{ $fmt := "%s/%s@%s/%s" }}
|
|
|
|
|
|
|
|
{{ $npm := .res.name }}
|
2022-09-11 18:33:41 +08:00
|
|
|
{{ with .res.alias2 }}
|
2022-09-11 11:14:54 +08:00
|
|
|
{{ $npm = . }}
|
|
|
|
{{ end }}
|
2022-09-11 18:33:41 +08:00
|
|
|
{{- $file := .res.file }}
|
|
|
|
|
2022-10-30 16:54:38 +08:00
|
|
|
{{- if ne .vendor "unpkg" }}
|
2022-09-11 18:33:41 +08:00
|
|
|
{{- with .res.alias }}
|
|
|
|
{{- $npm = . }}
|
|
|
|
{{- end }}
|
|
|
|
{{- $file = replaceRE `(dist|lib|source\/js)\/` "" .res.file }}
|
|
|
|
{{- $fmt = "%s/%s/%s/%s" }}
|
|
|
|
{{- end }}
|
|
|
|
|
2022-09-11 11:14:54 +08:00
|
|
|
{{ $pluginRes := printf $fmt .router $npm .res.version $file }}
|
|
|
|
|
|
|
|
{{ return $pluginRes }}
|