Commit 084d82f8 by Zachary Kazanski Committed by Timothée Peignier

Added mo-op compressors, and updated documentation

parent eb2740f6
......@@ -3,6 +3,7 @@
:2e_*
*.tmproj
.*.swp
*.swo
build
dist
MANIFEST
......@@ -18,3 +19,4 @@ tests/assets/js/dummy.js
.venv
.project
.pydevproject
.ropeproject
......@@ -78,4 +78,5 @@ or just made Pipeline more awesome.
* Trey Smith <trey.smith@nasa.gov>
* Venelin Stoykov <venelin@magicsolutions.bg>
* Victor Shnayder <victor@mitx.mit.edu>
* Zachary Kazanski <kazanski.zachary@gmail.com>
* Zenobius Jiricek <zenobius.jiricek@gmail.com>
......@@ -221,6 +221,17 @@ command to compress stylesheets. To use it, add this to your ``PIPELINE_CSS_COMP
Default to ``''``
No-Op Compressors
=================
The No-Op compressor don't perform any operation, when used, only concatenation occurs.
This is useful for debugging faulty concatenation due to poorly written javascript and other errors.
To use it, add this to your settings ::
PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.NoopCompressor'
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.NoopCompressor'
Write your own compressor class
===============================
......
......@@ -238,3 +238,11 @@ class SubProcessCompressor(CompressorBase):
elif self.verbose:
print(stderr)
return force_text(stdout)
class NoopCompressor(CompressorBase):
def compress_js(self, js):
return js
def compress_css(self, css):
return css
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment