File: csshtmljsminify.py

package info (click to toggle)
django-pipeline 4.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 916 kB
  • sloc: python: 3,198; makefile: 119; javascript: 59
file content (22 lines) | stat: -rw-r--r-- 546 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from pipeline.compressors import CompressorBase


class CssHtmlJsMinifyCompressor(CompressorBase):
    """
    CSS, HTML and JS compressor based on the Python library css-html-js-minify
    (https://pypi.org/project/css-html-js-minify/).
    """

    def compress_css(self, css):
        return css

        from css_html_js_minify import css_minify  # noqa: PLC0415

        return css_minify(css)

    def compress_js(self, js):
        return js

        from css_html_js_minify import js_minify  # noqa: PLC0415

        return js_minify(js)