django compressor - Can I use a filter on all compress blocks except for one? -


in settings compressor i'm using slimit of javascript:

compress_js_filters = ['compressor.filters.jsmin.slimitfilter', ]

some of js files shouldn't go through slimit though because file minified, or javascript throws error when minified other files. template block ends looking this:

{# code minify #} {% block compressed_libs %}     {% compress js %}         <script src="/static/js/compress_this.js"></script>         <script src="/static/js/also_compress_this.js"></script>         ...     {% endcompress %} {% endblock %}  {# code shouldn't minify #} {% block non-compressible_libs %}     <script src="/static/js/already.min.js"></script>     <script src="/static/js/breaks-everything.js"></script> {% endblock %} 

can set different compress filter rules different blocks/files "non-compressible" files can still concatenated compressor while skipping slimit?

as approxiblue said, doesn't there's way specify filters use per compress block in template (in compressor 1.5).

i'll update answer comes something.

it seems solved adding parameter compress template tag allow return compressornode flag skip filter in base.py hunks()

i'll see compressor community thinks this, let me know if have ideas.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -