Update script and version to 2.0.4; add .NET 9 support

This commit is contained in:
Daniel J. Summers 2024-12-13 16:57:27 -05:00
parent 5626031593
commit f4cd184a15
4 changed files with 11 additions and 9 deletions

2
.gitignore vendored
View File

@ -7,3 +7,5 @@
*.user
.vscode
src/*.nupkg
src/tests*.txt

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<VersionPrefix>2.0.3</VersionPrefix>
<PackageReleaseNotes>Update script tags to pull htmx 2.0.3 (no header or attribute changes)</PackageReleaseNotes>
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
<VersionPrefix>2.0.4</VersionPrefix>
<PackageReleaseNotes>Update script tags to pull htmx 2.0.4 (no header or attribute changes)</PackageReleaseNotes>
<Authors>danieljsummers</Authors>
<Company>Bit Badger Solutions</Company>
<PackageProjectUrl>https://git.bitbadger.solutions/bit-badger/Giraffe.Htmx</PackageProjectUrl>

View File

@ -819,14 +819,14 @@ let script =
let html = RenderView.AsString.htmlNode Script.minified
Expect.equal
html
"""<script src="https://unpkg.com/htmx.org@2.0.3" integrity="sha384-0895/pl2MU10Hqc6jd4RvrthNlDiE9U1tWmX7WRESftEDRosgxNsQG/Ze9YMRzHq" crossorigin="anonymous"></script>"""
"""<script src="https://unpkg.com/htmx.org@2.0.4" integrity="sha384-HGfztofotfshcF7+8n44JQL2oJmowVChPTg48S+jvZoztPfvwD79OC/LTtG6dMp+" crossorigin="anonymous"></script>"""
"Minified script tag is incorrect"
}
test "unminified succeeds" {
let html = RenderView.AsString.htmlNode Script.unminified
Expect.equal
html
"""<script src="https://unpkg.com/htmx.org@2.0.3/dist/htmx.js" integrity="sha384-BBDmZzVt6vjz5YbQqZPtFZW82o8QotoM7RUp5xOxV3nSJ8u2pSdtzFAbGKzTlKtg" crossorigin="anonymous"></script>"""
"""<script src="https://unpkg.com/htmx.org@2.0.4/dist/htmx.js" integrity="sha384-oeUn82QNXPuVkGCkcrInrS1twIxKhkZiFfr2TdiuObZ3n3yIeMiqcRzkIcguaof1" crossorigin="anonymous"></script>"""
"Unminified script tag is incorrect"
}
]

View File

@ -445,14 +445,14 @@ module Script =
/// Script tag to load the minified version from unpkg.com
let minified =
script [ _src "https://unpkg.com/htmx.org@2.0.3"
_integrity "sha384-0895/pl2MU10Hqc6jd4RvrthNlDiE9U1tWmX7WRESftEDRosgxNsQG/Ze9YMRzHq"
script [ _src "https://unpkg.com/htmx.org@2.0.4"
_integrity "sha384-HGfztofotfshcF7+8n44JQL2oJmowVChPTg48S+jvZoztPfvwD79OC/LTtG6dMp+"
_crossorigin "anonymous" ] []
/// Script tag to load the unminified version from unpkg.com
let unminified =
script [ _src "https://unpkg.com/htmx.org@2.0.3/dist/htmx.js"
_integrity "sha384-BBDmZzVt6vjz5YbQqZPtFZW82o8QotoM7RUp5xOxV3nSJ8u2pSdtzFAbGKzTlKtg"
script [ _src "https://unpkg.com/htmx.org@2.0.4/dist/htmx.js"
_integrity "sha384-oeUn82QNXPuVkGCkcrInrS1twIxKhkZiFfr2TdiuObZ3n3yIeMiqcRzkIcguaof1"
_crossorigin "anonymous" ] []