Added an optional per-asset folder to the Asset protocol and the AssetExtension extension in the Infrastructure package.

This commit is contained in:
2026-08-15 23:44:06 +02:00
parent 7d53be539e
commit 091c0f0686
5 changed files with 32 additions and 12 deletions
@@ -23,13 +23,13 @@ struct AssetExtensionTests {
@Test(arguments: zip(
Self.extensions,
Self.subdirectories
Self.folders
))
func `subdirectory`(
func `folder`(
for fileExtension: AssetExtension,
expects subdirectory: String?
expects folder: String?
) {
#expect(fileExtension.subdirectory == subdirectory)
#expect(fileExtension.folder == folder)
}
}
@@ -60,7 +60,7 @@ private extension AssetExtensionTests {
"application/manifest+json",
"application/xml"
]
static let subdirectories: [String?] = [
static let folders: [String?] = [
"css",
"js",
nil,