Skip to content

Commit

Permalink
add js and htmx as text files (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Sep 3, 2024
1 parent 2c46617 commit 1863f36
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<NoWarn>CS1591;CS0649</NoWarn>
<Version>8.3.0</Version>
<Version>8.4.0</Version>
<LangVersion>preview</LangVersion>
<AssemblyVersion>1.0.0</AssemblyVersion>
<Description>A collection of minimal binary files.</Description>
Expand Down
6 changes: 6 additions & 0 deletions src/EmptyFiles/ContentTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ public static bool TryGetExtension(string? mediaType, [NotNullWhen(true)] out st
{
"text/html", "html"
},
{
"text/htmx", "htmx"
},
{
"text/javascript", "js"
},
{
"text/plain", "txt"
},
Expand Down
5 changes: 4 additions & 1 deletion src/EmptyFiles/FileExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public static void AddTextExtensions(IEnumerable<string> extensions)
".htc",
".htm",
".html",
".htmx",
".htpasswd",
".hxx",
".ics",
Expand All @@ -234,6 +235,7 @@ public static void AddTextExtensions(IEnumerable<string> extensions)
".jhtm",
".jhtml",
".js",
".javascript",
".jscsrc",
".jshintignore",
".jshintrc",
Expand Down Expand Up @@ -417,7 +419,8 @@ public static void AddTextExtensions(IEnumerable<string> extensions)
".yml",
".zsh",
".zshrc"
}.ToFrozenSet();
}
.ToFrozenSet();

public static IReadOnlyCollection<string> TextExtensions => textExtensions;

Expand Down

0 comments on commit 1863f36

Please sign in to comment.