1Metadata-Version: 1.1 2Name: django-compressor 3Version: 2.4 4Summary: Compresses linked and inline JavaScript or CSS into single cached files. 5Home-page: https://django-compressor.readthedocs.io/en/latest/ 6Author: Jannis Leidel 7Author-email: jannis@leidel.info 8License: MIT 9Description: Django Compressor 10 ================= 11 12 .. image:: https://codecov.io/github/django-compressor/django-compressor/coverage.svg?branch=develop 13 :target: https://codecov.io/github/django-compressor/django-compressor?branch=develop 14 15 .. image:: https://img.shields.io/pypi/v/django_compressor.svg 16 :target: https://pypi.python.org/pypi/django_compressor 17 18 .. image:: https://secure.travis-ci.org/django-compressor/django-compressor.svg?branch=develop 19 :alt: Build Status 20 :target: http://travis-ci.org/django-compressor/django-compressor 21 22 .. image:: https://caniusepython3.com/project/django_compressor.svg 23 :target: https://caniusepython3.com/project/django_compressor 24 25 Django Compressor processes, combines and minifies linked and inline 26 Javascript or CSS in a Django template into cacheable static files. 27 28 It supports compilers such as coffeescript, LESS and SASS and is 29 extensible by custom processing steps. 30 31 Django Compressor is compatible with Django 1.11 and newer. 32 33 How it works 34 ------------ 35 In your templates, all HTML code between the tags ``{% compress js/css %}`` and 36 ``{% endcompress %}`` is parsed and searched for CSS or JS. These styles and 37 scripts are subsequently processed with optional, configurable compilers and 38 filters. 39 40 The default filter for CSS rewrites paths to static files to be absolute. 41 Both Javascript and CSS files are by default concatenated and minified. 42 43 As the final step the template tag outputs a ``<script>`` or ``<link>`` 44 tag pointing to the optimized file. Alternatively it can also 45 inline the resulting content into the original template directly. 46 47 Since the file name is dependent on the content, these files can be given 48 a far future expiration date without worrying about stale browser caches. 49 50 For increased performance, the concatenation and compressing process 51 can also be run once manually outside of the request/response cycle by using 52 the Django management command ``manage.py compress``. 53 54 Configurability & Extensibility 55 ------------------------------- 56 57 Django Compressor is highly configurable and extensible. The HTML parsing 58 is done using lxml_ or if it's not available Python's built-in HTMLParser by 59 default. As an alternative Django Compressor provides a BeautifulSoup_ and a 60 html5lib_ based parser, as well as an abstract base class that makes it easy to 61 write a custom parser. 62 63 Django Compressor also comes with built-in support for 64 `YUI CSS and JS`_ compressor, `yUglify CSS and JS`_ compressor, the Google's 65 `Closure Compiler`_, a Python port of Douglas Crockford's JSmin_, a Python port 66 of the YUI CSS Compressor csscompressor_ and a filter to convert (some) images into 67 `data URIs`_. 68 69 If your setup requires a different compressor or other post-processing 70 tool it will be fairly easy to implement a custom filter. Simply extend 71 from one of the available base classes. 72 73 More documentation about the usage and settings of Django Compressor can be 74 found on `django-compressor.readthedocs.org`_. 75 76 The source code for Django Compressor can be found and contributed to on 77 `github.com/django-compressor/django-compressor`_. There you can also file tickets. 78 79 The in-development version of Django Compressor can be installed with 80 ``pip install git+https://github.com/django-compressor/django-compressor.git`` 81 82 .. _BeautifulSoup: http://www.crummy.com/software/BeautifulSoup/ 83 .. _lxml: http://lxml.de/ 84 .. _html5lib: https://github.com/html5lib/html5lib-python 85 .. _YUI CSS and JS: http://developer.yahoo.com/yui/compressor/ 86 .. _yUglify CSS and JS: https://github.com/yui/yuglify 87 .. _Closure Compiler: http://code.google.com/closure/compiler/ 88 .. _JSMin: http://www.crockford.com/javascript/jsmin.html 89 .. _csscompressor: https://github.com/sprymix/csscompressor 90 .. _data URIs: http://en.wikipedia.org/wiki/Data_URI_scheme 91 .. _django-compressor.readthedocs.org: https://django-compressor.readthedocs.io/en/latest/ 92 .. _github.com/django-compressor/django-compressor: https://github.com/django-compressor/django-compressor 93 94Platform: UNKNOWN 95Classifier: Development Status :: 5 - Production/Stable 96Classifier: Framework :: Django 97Classifier: Intended Audience :: Developers 98Classifier: License :: OSI Approved :: MIT License 99Classifier: Operating System :: OS Independent 100Classifier: Programming Language :: Python 101Classifier: Programming Language :: Python :: 2 102Classifier: Programming Language :: Python :: 2.7 103Classifier: Programming Language :: Python :: 3 104Classifier: Programming Language :: Python :: 3.4 105Classifier: Programming Language :: Python :: 3.5 106Classifier: Programming Language :: Python :: 3.6 107Classifier: Programming Language :: Python :: 3.7 108Classifier: Programming Language :: Python :: 3.8 109Classifier: Topic :: Internet :: WWW/HTTP 110