mirror of https://github.com/onweru/compose.git

Blake Gearin
03.02.2022 c4ce90ce987a0f93fd2a4c70f1d42886cdb34534
layouts/partials/scripts/bundle.html
@@ -16,7 +16,13 @@
{{- $mainScriptPath := "js/index.js" }}
{{- $main := resources.Get $mainScriptPath | resources.ExecuteAsTemplate $mainScriptPath . }}
{{- $bundle := slice $variables $functions $code $main $fuse $search | resources.Concat "js/bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
{{- $customScriptPath := "js/custom.js" }}
{{ if (fileExists "../../assets/js/custom.js") }}
  {{ $customScriptPath := "../../assets/js/custom.js" }}
{{ end }}
{{- $custom := resources.Get $customScriptPath | resources.ExecuteAsTemplate $customScriptPath . }}
{{- $bundle := slice $variables $functions $code $main $fuse $search $custom | resources.Concat "js/bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
<script src="{{ $bundle.Permalink }}"></script>
{{- partialCached "hooks/scripts" . -}}