Additional filter support: cssmin #17

Merged
merged 2 commits into from Mar 20, 2011

Conversation

Projects
None yet
2 participants
@aidaeology

Adding cssmin functionality in order to to use YUI CSS Compressor algorithm without the java dependency.

Adding support for cssmin - a pure python port of YUI CSS Compressor,…
… for those of us who don't want to install java.

Set property DJANGO_STATIC_ CSSMIN = True  in settings to enable. Requires cssmin install.
@peterbe

This comment has been minimized.

Show comment
Hide comment
@peterbe

peterbe Mar 15, 2011

Please remove the warning and instead set a variable to false. Something like __cssmin_install__ = False

Please remove the warning and instead set a variable to false. Something like __cssmin_install__ = False

This comment has been minimized.

Show comment
Hide comment
Owner

aidaeology replied Mar 16, 2011

done

@peterbe

This comment has been minimized.

Show comment
Hide comment
@peterbe

peterbe Mar 15, 2011

If cssmin is installed it should just be used.

Make it something like:

    if __cssmin_installed__:
         _run_cssmin(content)
    elif STATIC_YUI_COMPRESSOR:
        ...
    return css_slimmer(...)

If cssmin is installed it should just be used.

Make it something like:

    if __cssmin_installed__:
         _run_cssmin(content)
    elif STATIC_YUI_COMPRESSOR:
        ...
    return css_slimmer(...)

This comment has been minimized.

Show comment
Hide comment
@aidaeology

aidaeology Mar 16, 2011

Owner

done.

Owner

aidaeology replied Mar 16, 2011

done.

@peterbe

This comment has been minimized.

Show comment
Hide comment
@peterbe

peterbe Mar 15, 2011

No need to set this as a setting. Just use it if it's installed.

No need to set this as a setting. Just use it if it's installed.

@peterbe

This comment has been minimized.

Show comment
Hide comment
@peterbe

peterbe Mar 15, 2011

Should be:

    return slimmer is not None or __cssmin_installed__

Should be:

    return slimmer is not None or __cssmin_installed__

This comment has been minimized.

Show comment
Hide comment
@aidaeology

aidaeology Mar 16, 2011

Owner

done.

Owner

aidaeology replied Mar 16, 2011

done.

@peterbe

This comment has been minimized.

Show comment
Hide comment
@peterbe

peterbe Mar 15, 2011

Can you please also update the README to say that if you install cssmin (and a link to it) it will automatically be used first.

Can you please also update the README to say that if you install cssmin (and a link to it) it will automatically be used first.

This comment has been minimized.

Show comment
Hide comment
@aidaeology

aidaeology Mar 15, 2011

Owner
Owner

aidaeology replied Mar 15, 2011

@peterbe peterbe merged commit 737f9de into peterbe:master Mar 20, 2011

@peterbe

This comment has been minimized.

Show comment
Hide comment
@peterbe

peterbe Mar 20, 2011

Owner

I've rewritten much of the patch. All tests pass now and I tidied up the way it works on jsmin and or cssmin.

Next thing to work on will be to make the selection of compressor much more flexible.

Owner

peterbe commented Mar 20, 2011

I've rewritten much of the patch. All tests pass now and I tidied up the way it works on jsmin and or cssmin.

Next thing to work on will be to make the selection of compressor much more flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment