Skip to content

Commit

Permalink
rename as a setting key for #72 was a bad idea.
Browse files Browse the repository at this point in the history
We use `output_path` instead.
  • Loading branch information
regisphilibert committed Sep 23, 2022
1 parent b9e7507 commit 56c98d7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions core/scripts/private/ParseScript.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{{ $minify = partialCached "huge/env/When" $minify $minify }}
{{ $fingerprint := $script.fingerprint | default "production" }}
{{ $fingerprint = partialCached "huge/env/When" $fingerprint $fingerprint }}
{{ $rename := $script.rename | default "" }}
{{ $output_path := $script.output_path | default "" }}
{{ $params := $script.params | default dict }}
{{ $shims := $script.shims | default slice }}
{{ $target := $script.target | default "esnext" }}
Expand All @@ -72,7 +72,7 @@
"externals" $externals
"minify" $minify
"fingerprint" $fingerprint
"rename" $rename
"output_path" $output_path
"params" $params
"shims" $shims
"target" $target
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/private/transform/_.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
{{ $resource = $resource | fingerprint }}
{{ end }}

{{/* If user wants to customize the output path with the `rename` setting. */}}
{{ with $.rename }}
{{/* If user wants to customize the output path with the `output_path` setting. */}}
{{ with $.output_path }}
{{ $resource = $resource | resources.Copy . }}
{{ end }}

Expand Down
4 changes: 2 additions & 2 deletions core/styles/private/GetTransformations.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
{{ if partialCached "huge/env/When" $fingerprint $fingerprint }}
{{ $transformations = $transformations | append "fingerprint" }}
{{ end }}
{{/* Most transformations don't need any arguments except for rename. We'll use a map for context */}}
{{ with .rename }}
{{/* Most transformations don't need any arguments except for output_path. We'll use a map for context */}}
{{ with .output_path }}
{{ $transformations = $transformations | append (dict
"transformation" "copy"
"context" .
Expand Down
4 changes: 2 additions & 2 deletions core/styles/private/ParseStyle.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
{{ $transformations := partial "huge/styles/private/GetTransformations" $style | default slice }}
{{ $internal := $style.internal | default false }}
{{ $integrity := $style.integrity | default false }}
{{ $rename := $style.rename | default false }}
{{ $output_path := $style.output_path | default false }}
{{ $data = dict
"name" $name
"path" $style.path
"internal" $internal
"integrity" $integrity
"transformations" $transformations
"rename" $rename
"output_path" $output_path
}}
{{ end }}

Expand Down

0 comments on commit 56c98d7

Please sign in to comment.