Open solsticedhiver opened 14 years ago
This can be fixed by adding a simple check to hydeengine.media_processors.YUICompressor
(since that's usually the last processor in each "chain" in the MEDIA_PROCESSORS
setting), whereby if the given file's extension is one of ccss, sass, less, or hss, it sets a local variable was_processed
to True
and sets thecommand
to the usual command string but with --type=css
after the first %s
. thecommand
would then be used as the argument to commands.get_status_output
. The value of was_processed
would then be checked once again, and if it was set to True
, the temp file would be moved to an altered filename, with the extension properly altered. Otherwise, it would write back into the just-deleted source file as usual.
hi. i was trying to use a clevercss template in media/css and after ./hyde.py -g, i noticed only a .ccss and a .ccss.z-tmp in my deploy/media/css
it seems the command running the yuicompressor failed because the file deploy/media/css/base.ccss.z-tmp contains:
it seems to fail because the input file has .ccss extension one need to use --type css if the extension is not .css
there seems to be an issue with the pipe processing of media processor.
base.ccss is converted to base.ccss by clevercss (wouldn't it be better to be base.css), then yuicompressor use base.ccss but fails because the extension is not .js or .css.
also, if i remove the yuicompressor from the pipe for ccss in my settings.py, i end up with a base.ccss in my deploy/media/css, that file containing css and not clevercss, and then should have been called base.css.