Last active
December 28, 2015 12:48
-
-
Save chriskief/7502732 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from compressor.conf import settings | |
from compressor.filters import CompilerFilter | |
class YUglifyFilter(CompilerFilter): | |
command = "{binary} {args}" | |
def __init__(self, *args, **kwargs): | |
super(YUglifyFilter, self).__init__(*args, **kwargs) | |
self.command += ' --type=%s' % self.type | |
class YUglifyCSSFilter(YUglifyFilter): | |
type = 'css' | |
options = ( | |
("binary", settings.COMPRESS_YUGLIFY_BINARY), | |
("args", settings.COMPRESS_YUGLIFY_CSS_ARGUMENTS), | |
) | |
class YUglifyJSFilter(YUglifyFilter): | |
type = 'js' | |
options = ( | |
("binary", settings.COMPRESS_YUGLIFY_BINARY), | |
("args", settings.COMPRESS_YUGLIFY_JS_ARGUMENTS), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment