Django: auto minifying css/js files before release

Posted by Dzida on Stack Overflow See other posts from Stack Overflow or by Dzida
Published on 2010-06-17T14:15:38Z Indexed on 2010/06/17 14:23 UTC
Read the original article Hit count: 186

Filed under:
|
|
|
|

Hi,

I have following case: I want to use uncompressed js/css files during development (to debug js for example) but on production I want to switch automatically to minified versions of that files.

some simple solution is to put in your template:

<script src="some_js.{% if not debug %}min.{% endif %}js"....

but this require manully providing that such file exist and to do minifaction manullay after original file change.

How do you accomplish this in your projects? Is there any tool for this?

© Stack Overflow or respective owner

Related posts about html

Related posts about django