Hi! Is there anyway to collect and concatenate the CSS or JS in a particular block and then pass it through a filter chain? In particular, I'd like to use pyScss to process my SCSS. I've created a pySCSSFilter extending FilterBase, and I'd really like to do something like:
I'll second a vote for a way to concatenate the files before pre-compiling. This would be very helpfull when using less etc. since a standway is to keep mixins and global variables in one file and merge it in before compiling. Right now you have to repeat those vars and mixins in every css file ie if you have a set of skin color global vars that is used in multiple css files, which sort of ruins the purpose of using global vars in css frameworks like sass or less, unless you keep everything in one file.
I understand the problem hvdklauw mentions, so maybe it could be an option on each compress block wether or not to merge before pre-compiling or after?
It is very important when using css preprocessors such less, its 'core' feauture is allowing to use mixins. Therefore concatenting files before processing through filter is a must-have functionality. Is there any plans to merge @jannon requests do dev branch django_compressor?
@airtonix I started doing this, but the changes to any @import'ed files don't get watched, and so the server needs to be restarted for every css change in them.
Kinda amazed this feature hasn't been implemented yet. webassets solved this, allowing users to use SASS_AS_OUTPUT = True, which optionally concats the files first.