Any CSS or JS defined in a bird component should be collected as part of the compilation and thrown in some registry that can then be referenced to provide assets when a component is included in a template.
I really like Flux here, where there's just one reference per asset type in the base template:
(Not married to those templatetag names, but it'll do for now.)
Then in the templatetag's themselves, have someway to look up what components are on the page and only return those. This is a wishlist item, as I sit here now I'm struggling to come up with how to handle partials e.g. through an HTMX request.
There may be a way to accomplish this, but in the mean time just returning all the component asset files will be fine.
Any CSS or JS defined in a bird component should be collected as part of the compilation and thrown in some registry that can then be referenced to provide assets when a component is included in a template.
I really like Flux here, where there's just one reference per asset type in the base template:
I assume that's laravel's version of a templatetag, so for django-bird the equivalent would look something like:
(Not married to those templatetag names, but it'll do for now.)
Then in the templatetag's themselves, have someway to look up what components are on the page and only return those. This is a wishlist item, as I sit here now I'm struggling to come up with how to handle partials e.g. through an HTMX request.
There may be a way to accomplish this, but in the mean time just returning all the component asset files will be fine.