Skip to content

Commit

Permalink
Merge pull request #96 from gethinode/develop
Browse files Browse the repository at this point in the history
fix: refine patterns for file bundling
  • Loading branch information
markdumay authored Sep 17, 2024
2 parents 93fb682 + e86851c commit 2ef90d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layouts/partials/utilities/bundle.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{{- $modules := .modules -}}
{{- $all := .all }}
{{- $basepath := strings.TrimSuffix "/" .basepath -}}
{{- $ext := trim (path.Ext (trim $match "{}")) "." -}}
{{- $ext := trim (path.Ext (trim $match "{}")) "." | default "js" -}}
{{- if not $ext -}}
{{- errorf "partial [assets/bundle.html] - Cannot derive file extension of match pattern: %s" $match -}}
{{- end -}}
Expand All @@ -30,7 +30,7 @@
{{- $matches = $matches | append (printf "%s/%s.%s" $basepath $mod $ext) -}}
{{- end -}}
{{- end -}}
{{- $match = printf "{%s}" (delimit $matches ",") }}
{{- $match = printf "{%s}" (trim (delimit $matches ",") ",") }}
{{- end -}}

<!-- TODO: concat by module, then sorted by filename -->
Expand All @@ -49,7 +49,7 @@
{{- end -}}

{{- if $debugging -}}
{{ warnf "Processing pattern: %s" $match}}
{{ warnf "Processing pattern for '%s': %s" $filename $match}}
{{- range $index, $file := $sorted -}}
{{- warnf " - Processing file: %s" $file }}
{{- end -}}
Expand Down

0 comments on commit 2ef90d2

Please sign in to comment.