{{- $transpiler := site.Params.main.build.transpiler | default "libsass" -}} {{- $supportedTranspilers := slice "libsass" "dartsass" -}} {{- if not (in $supportedTranspilers $transpiler) -}} {{- errorf "partial [head/stylesheet.html] - Invalid value for param 'transpiler': %s" $transpiler -}} {{- end -}} {{ warnf "Transpiler: %s" $transpiler }} {{- $source := "scss/bootstrap.scss" -}} {{- if eq $transpiler "dartsass" }}{{ $source = "scss/bootstrap-dart.scss" }}{{ end -}} {{- $target := "css/main.css" -}} {{ $match := "scss/**.scss" }} {{ $files := sort (resources.Match $match) "Key" "asc" }} {{ warnf "Processing pattern: %s" $match}} {{- range $index, $file := $files -}} {{- warnf " - Processing file: %s" $file.Key }} {{- end -}} {{- $options := (dict "transpiler" $transpiler "targetPath" $target) -}} {{- $options = merge $options (dict "outputStyle" "expanded") -}} {{/*- $css := resources.Get $source | resources.ExecuteAsTemplate "style.app.scss" . | toCSS $options -*/}} {{- $css := resources.GetMatch $source | resources.ExecuteAsTemplate "style.app.scss" . | toCSS $options -}}