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 }}
|
2023-01-01 21:12:58 +08:00
|
|
|
{{ $file := .res.file }}
|
2022-09-11 18:33:41 +08:00
|
|
|
|
2024-07-20 21:36:08 +08:00
|
|
|
{{ if ne .router.type "nodejs" }}
|
2023-01-01 21:12:58 +08:00
|
|
|
{{ with .res.alias }}
|
|
|
|
{{ $npm = . }}
|
|
|
|
{{ end }}
|
|
|
|
{{ $file = replaceRE `(dist|lib|source\/js)\/` "" .res.file }}
|
|
|
|
{{ $fmt = "%s/%s/%s/%s" }}
|
|
|
|
{{ end }}
|
2022-09-11 18:33:41 +08:00
|
|
|
|
2024-07-20 21:36:08 +08:00
|
|
|
{{ $pluginRes := printf $fmt .router.url $npm .res.version $file }}
|
2022-09-11 11:14:54 +08:00
|
|
|
|
|
|
|
{{ return $pluginRes }}
|