Project updates from Template (#1)

This PR contains the latest updates from the generic Website template, which have been added while working on #loud-amsterdam.

Reviewed-on: #1
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #1.
This commit is contained in:
2026-09-04 13:40:35 +00:00
committed by javier
parent 08b4d80064
commit 65b62681eb
60 changed files with 2347 additions and 326 deletions
@@ -32,6 +32,17 @@ struct AssetExtensionTests {
#expect(fileExtension.folder == folder)
}
// MARK: CaseIterable tests
@Test
func `covers every case in the parameterised tests`() {
// `zip` stops at the shorter sequence, so a case missing from the arrays below is silently untested rather
// than failing this is what catches that.
#expect(Self.extensions == AssetExtension.allCases)
#expect(Self.contentTypes.count == AssetExtension.allCases.count)
#expect(Self.folders.count == AssetExtension.allCases.count)
}
}
// MARK: - Helpers
@@ -42,32 +53,44 @@ private extension AssetExtensionTests {
static let extensions: [AssetExtension] = [
.css,
.js,
.png,
.ico,
.jpg,
.js,
.mp4,
.png,
.svg,
.txt,
.webmanifest,
.webp,
.woff2,
.xml
]
static let contentTypes: [String] = [
"text/css",
"text/javascript",
"image/png",
"image/vnd.microsoft.icon",
"image/jpeg",
"text/javascript",
"video/mp4",
"image/png",
"image/svg+xml",
"text/plain",
"application/manifest+json",
"image/webp",
"font/woff2",
"application/xml"
]
static let folders: [String?] = [
"css",
nil,
"img",
"js",
"video",
nil,
nil,
nil,
nil,
nil,
"img",
"font",
nil
]