{{/* Use to get resources path with vendor */}}

{{ $fmt := "%s/%s@%s/%s" }}

{{ $npm := .res.name }}
{{ with .res.alias2 }}
  {{ $npm = . }}
{{ end }}   
{{- $file := .res.file }}

{{- if ne .vendor "unpkg" }}
  {{- with .res.alias }}
    {{- $npm = . }}
  {{- end }}   
  {{- $file = replaceRE `(dist|lib|source\/js)\/` "" .res.file }}
  {{- $fmt = "%s/%s/%s/%s" }}
{{- end }}

{{ $pluginRes := printf $fmt .router $npm .res.version $file }}

{{ return $pluginRes }}