Remove support for CSSTidy. ref #664
This commit is contained in:
@@ -50,7 +50,7 @@ default. As an alternative Django Compressor provides a BeautifulSoup_ and a
|
|||||||
html5lib_ based parser, as well as an abstract base class that makes it easy to
|
html5lib_ based parser, as well as an abstract base class that makes it easy to
|
||||||
write a custom parser.
|
write a custom parser.
|
||||||
|
|
||||||
Django Compressor also comes with built-in support for `CSS Tidy`_,
|
Django Compressor also comes with built-in support for
|
||||||
`YUI CSS and JS`_ compressor, `yUglify CSS and JS`_ compressor, the Google's
|
`YUI CSS and JS`_ compressor, `yUglify CSS and JS`_ compressor, the Google's
|
||||||
`Closure Compiler`_, a Python port of Douglas Crockford's JSmin_, a Python port
|
`Closure Compiler`_, a Python port of Douglas Crockford's JSmin_, a Python port
|
||||||
of the YUI CSS Compressor cssmin_ and a filter to convert (some) images into
|
of the YUI CSS Compressor cssmin_ and a filter to convert (some) images into
|
||||||
@@ -72,7 +72,6 @@ The in-development version of Django Compressor can be installed with
|
|||||||
.. _BeautifulSoup: http://www.crummy.com/software/BeautifulSoup/
|
.. _BeautifulSoup: http://www.crummy.com/software/BeautifulSoup/
|
||||||
.. _lxml: http://lxml.de/
|
.. _lxml: http://lxml.de/
|
||||||
.. _html5lib: http://code.google.com/p/html5lib/
|
.. _html5lib: http://code.google.com/p/html5lib/
|
||||||
.. _CSS Tidy: http://csstidy.sourceforge.net/
|
|
||||||
.. _YUI CSS and JS: http://developer.yahoo.com/yui/compressor/
|
.. _YUI CSS and JS: http://developer.yahoo.com/yui/compressor/
|
||||||
.. _yUglify CSS and JS: https://github.com/yui/yuglify
|
.. _yUglify CSS and JS: https://github.com/yui/yuglify
|
||||||
.. _Closure Compiler: http://code.google.com/closure/compiler/
|
.. _Closure Compiler: http://code.google.com/closure/compiler/
|
||||||
@@ -81,4 +80,3 @@ The in-development version of Django Compressor can be installed with
|
|||||||
.. _data URIs: http://en.wikipedia.org/wiki/Data_URI_scheme
|
.. _data URIs: http://en.wikipedia.org/wiki/Data_URI_scheme
|
||||||
.. _django-compressor.readthedocs.org: http://django-compressor.readthedocs.org/en/latest/
|
.. _django-compressor.readthedocs.org: http://django-compressor.readthedocs.org/en/latest/
|
||||||
.. _github.com/django-compressor/django-compressor: https://github.com/django-compressor/django-compressor
|
.. _github.com/django-compressor/django-compressor: https://github.com/django-compressor/django-compressor
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ class CompressorConf(AppConf):
|
|||||||
CACHEABLE_PRECOMPILERS = ()
|
CACHEABLE_PRECOMPILERS = ()
|
||||||
CLOSURE_COMPILER_BINARY = 'java -jar compiler.jar'
|
CLOSURE_COMPILER_BINARY = 'java -jar compiler.jar'
|
||||||
CLOSURE_COMPILER_ARGUMENTS = ''
|
CLOSURE_COMPILER_ARGUMENTS = ''
|
||||||
CSSTIDY_BINARY = 'csstidy'
|
|
||||||
CSSTIDY_ARGUMENTS = '--template=highest'
|
|
||||||
YUI_BINARY = 'java -jar yuicompressor.jar'
|
YUI_BINARY = 'java -jar yuicompressor.jar'
|
||||||
YUI_CSS_ARGUMENTS = ''
|
YUI_CSS_ARGUMENTS = ''
|
||||||
YUI_JS_ARGUMENTS = ''
|
YUI_JS_ARGUMENTS = ''
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
from compressor.conf import settings
|
|
||||||
from compressor.filters import CompilerFilter
|
|
||||||
|
|
||||||
|
|
||||||
class CSSTidyFilter(CompilerFilter):
|
|
||||||
command = "{binary} {infile} {args} {outfile}"
|
|
||||||
options = (
|
|
||||||
("binary", settings.COMPRESS_CSSTIDY_BINARY),
|
|
||||||
("args", settings.COMPRESS_CSSTIDY_ARGUMENTS),
|
|
||||||
)
|
|
||||||
@@ -20,7 +20,6 @@ from compressor.filters.css_default import CssAbsoluteFilter
|
|||||||
from compressor.filters.jsmin import JSMinFilter
|
from compressor.filters.jsmin import JSMinFilter
|
||||||
from compressor.filters.template import TemplateFilter
|
from compressor.filters.template import TemplateFilter
|
||||||
from compressor.filters.closure import ClosureCompilerFilter
|
from compressor.filters.closure import ClosureCompilerFilter
|
||||||
from compressor.filters.csstidy import CSSTidyFilter
|
|
||||||
from compressor.filters.yuglify import YUglifyCSSFilter, YUglifyJSFilter
|
from compressor.filters.yuglify import YUglifyCSSFilter, YUglifyJSFilter
|
||||||
from compressor.filters.yui import YUICSSFilter, YUIJSFilter
|
from compressor.filters.yui import YUICSSFilter, YUIJSFilter
|
||||||
from compressor.filters.cleancss import CleanCSSFilter
|
from compressor.filters.cleancss import CleanCSSFilter
|
||||||
@@ -31,22 +30,6 @@ def blankdict(*args, **kwargs):
|
|||||||
return defaultdict(lambda: '', *args, **kwargs)
|
return defaultdict(lambda: '', *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unittest.skipIf(find_command(settings.COMPRESS_CSSTIDY_BINARY) is None,
|
|
||||||
'CSStidy binary %r not found' % settings.COMPRESS_CSSTIDY_BINARY)
|
|
||||||
class CssTidyTestCase(TestCase):
|
|
||||||
def test_tidy(self):
|
|
||||||
content = textwrap.dedent("""\
|
|
||||||
/* Some comment */
|
|
||||||
font,th,td,p{
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
""")
|
|
||||||
ret = CSSTidyFilter(content).input()
|
|
||||||
self.assertIsInstance(ret, six.text_type)
|
|
||||||
self.assertEqual(
|
|
||||||
"font,th,td,p{color:#000;}", CSSTidyFilter(content).input())
|
|
||||||
|
|
||||||
|
|
||||||
@override_settings(COMPRESS_CACHEABLE_PRECOMPILERS=('text/css',))
|
@override_settings(COMPRESS_CACHEABLE_PRECOMPILERS=('text/css',))
|
||||||
class PrecompilerTestCase(TestCase):
|
class PrecompilerTestCase(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
@@ -440,10 +423,6 @@ class SpecializedFiltersTest(TestCase):
|
|||||||
filter = ClosureCompilerFilter('')
|
filter = ClosureCompilerFilter('')
|
||||||
self.assertEqual(filter.options, (('binary', six.text_type('java -jar compiler.jar')), ('args', six.text_type(''))))
|
self.assertEqual(filter.options, (('binary', six.text_type('java -jar compiler.jar')), ('args', six.text_type(''))))
|
||||||
|
|
||||||
def test_csstidy_filter(self):
|
|
||||||
filter = CSSTidyFilter('')
|
|
||||||
self.assertEqual(filter.options, (('binary', six.text_type('csstidy')), ('args', six.text_type('--template=highest'))))
|
|
||||||
|
|
||||||
def test_yuglify_filters(self):
|
def test_yuglify_filters(self):
|
||||||
filter = YUglifyCSSFilter('')
|
filter = YUglifyCSSFilter('')
|
||||||
self.assertEqual(filter.command, '{binary} {args} --type=css')
|
self.assertEqual(filter.command, '{binary} {args} --type=css')
|
||||||
|
|||||||
@@ -87,18 +87,6 @@ Backend settings
|
|||||||
feature, and the ``'content'`` in case you're using multiple servers
|
feature, and the ``'content'`` in case you're using multiple servers
|
||||||
to serve your content.
|
to serve your content.
|
||||||
|
|
||||||
- ``compressor.filters.csstidy.CSSTidyFilter``
|
|
||||||
|
|
||||||
A filter that passes the CSS content to the CSSTidy_ tool.
|
|
||||||
|
|
||||||
.. attribute:: COMPRESS_CSSTIDY_BINARY
|
|
||||||
|
|
||||||
The CSSTidy binary filesystem path.
|
|
||||||
|
|
||||||
.. attribute:: COMPRESS_CSSTIDY_ARGUMENTS
|
|
||||||
|
|
||||||
The arguments passed to CSSTidy.
|
|
||||||
|
|
||||||
- ``compressor.filters.datauri.CssDataUriFilter``
|
- ``compressor.filters.datauri.CssDataUriFilter``
|
||||||
|
|
||||||
A filter for embedding media as `data: URIs`_ in the CSS.
|
A filter for embedding media as `data: URIs`_ in the CSS.
|
||||||
@@ -155,7 +143,6 @@ Backend settings
|
|||||||
The arguments passed to clean-css.
|
The arguments passed to clean-css.
|
||||||
|
|
||||||
|
|
||||||
.. _CSSTidy: http://csstidy.sourceforge.net/
|
|
||||||
.. _`data: URIs`: http://en.wikipedia.org/wiki/Data_URI_scheme
|
.. _`data: URIs`: http://en.wikipedia.org/wiki/Data_URI_scheme
|
||||||
.. _cssmin: http://pypi.python.org/pypi/cssmin/
|
.. _cssmin: http://pypi.python.org/pypi/cssmin/
|
||||||
.. _rCSSmin: http://opensource.perlig.de/rcssmin/
|
.. _rCSSmin: http://opensource.perlig.de/rcssmin/
|
||||||
|
|||||||
Reference in New Issue
Block a user