Do not build styles twise in development. Output identical.
This commit is contained in:
parent
ae3ca2e41c
commit
6aa7ff2b49
1 changed files with 12 additions and 12 deletions
|
|
@ -1,16 +1,16 @@
|
|||
{{ $main_options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "includePaths" (slice "assets/lib/typey/stylesheets")) -}}
|
||||
{{ $mobile_options := (dict "targetPath" "css/mobile.css" "outputStyle" "compressed" "includePaths" (slice "assets/lib/typey/stylesheets")) -}}
|
||||
{{ $print_options := (dict "targetPath" "css/print.css" "outputStyle" "compressed" "includePaths" (slice "assets/lib/typey/stylesheets")) -}}
|
||||
{{ $main_style := resources.Get "sass/styles.scss" | toCSS $main_options | fingerprint -}}
|
||||
{{ $mobile_style := resources.Get "sass/mobile.scss" | toCSS $mobile_options | fingerprint -}}
|
||||
{{ $print_style := resources.Get "sass/print.scss" | toCSS $print_options | fingerprint -}}
|
||||
{{ $main_options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" false "includePaths" (slice "assets/lib/typey/stylesheets")) -}}
|
||||
{{ if eq hugo.Environment "development" -}}
|
||||
{{ $main_options = (dict "targetPath" "css/styles.css" "outputStyle" "nested" "enableSourceMap" true "includePaths" (slice "assets/lib/typey/stylesheets")) -}}
|
||||
{{ $mobile_options = (dict "targetPath" "css/mobile.css" "outputStyle" "nested" "enableSourceMap" true "includePaths" (slice "assets/lib/typey/stylesheets")) -}}
|
||||
{{ $print_options = (dict "targetPath" "css/print.css" "outputStyle" "nested" "enableSourceMap" true "includePaths" (slice "assets/lib/typey/stylesheets")) -}}
|
||||
{{ $main_style = resources.Get "sass/styles.scss" | toCSS $main_options -}}
|
||||
{{ $mobile_style = resources.Get "sass/mobile.scss" | toCSS $mobile_options -}}
|
||||
{{ $print_style = resources.Get "sass/print.scss" | toCSS $print_options -}}
|
||||
{{ $main_options = merge $main_options (dict "outputStyle" "nested" "enableSourceMap" true) -}}
|
||||
{{ end -}}
|
||||
{{ $mobile_options := merge $main_options (dict "targetPath" "css/mobile.css") -}}
|
||||
{{ $print_options := merge $main_options (dict "targetPath" "css/print.css") -}}
|
||||
{{ $main_style := resources.Get "sass/styles.scss" | toCSS $main_options -}}
|
||||
{{ $mobile_style := resources.Get "sass/mobile.scss" | toCSS $mobile_options -}}
|
||||
{{ $print_style := resources.Get "sass/print.scss" | toCSS $print_options -}}
|
||||
{{ if ne hugo.Environment "development" -}}
|
||||
{{ $main_style = $main_style | fingerprint -}}
|
||||
{{ $mobile_style = $mobile_style | fingerprint -}}
|
||||
{{ $print_style = $print_style | fingerprint -}}
|
||||
{{ end -}}
|
||||
{{ if $.Param "mobilemenu" -}}
|
||||
<link rel="stylesheet" href="{{ $mobile_style.RelPermalink }}" media="screen">
|
||||
|
|
|
|||
Loading…
Reference in a new issue