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

weru
31.57.2021 3a91e293ce3eb1b3940c5bb62cd32c90b4897b9f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{{- $variablesPath := "js/variables.js" }}
{{- $variables := resources.Get $variablesPath | resources.ExecuteAsTemplate $variablesPath . }}
 
{{- $funcPath := "js/functions.js" }}
{{- $functions := resources.Get $funcPath | resources.ExecuteAsTemplate $funcPath . }}
 
{{- $codePath := "js/code.js" }}
{{- $code := resources.Get $codePath | resources.ExecuteAsTemplate $codePath . }}
 
{{- $fusePath := "js/fuse.js" }}
{{- $fuse := resources.Get $fusePath | resources.ExecuteAsTemplate $fusePath . }}
 
{{- $searchPath := "js/search.js" }}
{{- $search := resources.Get $searchPath | resources.ExecuteAsTemplate $searchPath . }}
 
{{- $mainScriptPath := "js/index.js" }}
{{- $main := resources.Get $mainScriptPath | resources.ExecuteAsTemplate $mainScriptPath . }}
 
{{- $bundle := slice $variables $functions $code $main | resources.Concat "js/bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
{{- $bundle2 := slice $fuse $search | resources.Concat "js/search.js" | resources.Minify | resources.Fingerprint "sha512" }}
<script src="{{ $bundle.Permalink }}"></script>
<script src="{{ $bundle2.Permalink }}" async defer></script>