I recently found I needed to create a command to include specific files for collectstatic and ignore everything else (images and fonts). The opposite of the current --ignore functionality.
I've tried to do this with the current --ignore option using glob syntax but haven't managed to "ignore all but these file types".
I'm making this functionality now for my project but wondering if it would be a welcome addition to django itself?
if include_patterns and not matches_patterns(fn, include_patterns):
continue
And some upstream changes to include "include_patterns" as an option for the file finders list methods and the collectstatic command itself.
Setting include_patterns to a default of None should make the addition backwards compatible for any third party finders.
Is there any interest in doing this? I accept my current use case is fairly niche but it may be useful for others.
Nick.