Skip to content

Commit

Permalink
Merge pull request #36 from theNewDynamic/34-use-internal-key
Browse files Browse the repository at this point in the history
Use `internal` key for style/scripts instead of `inline`
  • Loading branch information
regisphilibert committed Sep 23, 2021
2 parents 67dcefd + a07fd77 commit f782d5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions core/scripts/private/GetDeclaredScripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
we therfore default on "none" for $defines, and test the type of context from within the partial */}}
{{ $defines := $script.defines | default "none" }}
{{ $defines = partialCached "huge/scripts/private/GetDefines" $defines $defines }}
{{ $inline := $script.inline | default false }}
{{ $internal := $script.internal | default false }}
{{ $inject := $script.inject | default slice }}
{{ $externals := $script.externals | default slice }}
{{ $format := $script.format | default "iife" }}
Expand All @@ -55,7 +55,7 @@
"defines" $defines
"format" $format
"integrity" $integrity
"inline" $inline
"internal" $internal
"inject" $inject
"externals" $externals
"minify" $minify
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/private/GetTags.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
}}

{{/* If inline, we overwrite previously set $tag */}}
{{ if $script.inline }}
{{ if $script.internal }}
{{ $tag = dict
"name" "script"
"inner" .Content
Expand Down
6 changes: 3 additions & 3 deletions core/styles/private/GetTags.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{{ range $style := $styles }}
{{ $transformations := delimit $style.transformations ", " | default "none" }}
{{ with partialCached "huge/styles/private/transform/_" . .name }}
{{/* Default assumes this is a link rather than inline */}}
{{/* Default assumes this is external (link) rather than internal */}}
{{ $tag := dict
"name" "link"
"attr" (dict
Expand All @@ -49,8 +49,8 @@
)
}}

{{/* If inline, we overwrite previously set $tag */}}
{{ if $style.inline }}
{{/* If internal, we overwrite previously set $tag */}}
{{ if $style.internal }}
{{ $tag = dict
"name" "style"
"inner" .Content
Expand Down

0 comments on commit f782d5c

Please sign in to comment.