Open bep opened 1 month ago
Working in improving the JS build situation, I'm ending up in a situation where I get a Resources slice that contains both Javascript and CSS.
Resources
I could filter this with where, but since this will be such a common construct, I think we need to add another By* method.
where
By*
We have Resources.ByType which is (a little confusingly) filtering by the media type's main type.
Resources.ByType
I suggest we add:
Resources.ByMediaType so {{ $resources.ByMediaType "text/css" }} would return what's expected.
Resources.ByMediaType
{{ $resources.ByMediaType "text/css" }}
Working in improving the JS build situation, I'm ending up in a situation where I get a
Resources
slice that contains both Javascript and CSS.I could filter this with
where
, but since this will be such a common construct, I think we need to add anotherBy*
method.We have
Resources.ByType
which is (a little confusingly) filtering by the media type's main type.I suggest we add:
Resources.ByMediaType
so{{ $resources.ByMediaType "text/css" }}
would return what's expected.