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

Added mo-op compressors, and updated documentation

parent eb2740f6
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
:2e_* :2e_*
*.tmproj *.tmproj
.*.swp .*.swp
*.swo
build build
dist dist
MANIFEST MANIFEST
...@@ -18,3 +19,4 @@ tests/assets/js/dummy.js ...@@ -18,3 +19,4 @@ tests/assets/js/dummy.js
.venv .venv
.project .project
.pydevproject .pydevproject
.ropeproject
...@@ -78,4 +78,5 @@ or just made Pipeline more awesome. ...@@ -78,4 +78,5 @@ or just made Pipeline more awesome.
* Trey Smith <trey.smith@nasa.gov> * Trey Smith <trey.smith@nasa.gov>
* Venelin Stoykov <venelin@magicsolutions.bg> * Venelin Stoykov <venelin@magicsolutions.bg>
* Victor Shnayder <victor@mitx.mit.edu> * Victor Shnayder <victor@mitx.mit.edu>
* Zachary Kazanski <kazanski.zachary@gmail.com>
* Zenobius Jiricek <zenobius.jiricek@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 ...@@ -221,6 +221,17 @@ command to compress stylesheets. To use it, add this to your ``PIPELINE_CSS_COMP
Default to ``''`` 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 Write your own compressor class
=============================== ===============================
......
...@@ -238,3 +238,11 @@ class SubProcessCompressor(CompressorBase): ...@@ -238,3 +238,11 @@ class SubProcessCompressor(CompressorBase):
elif self.verbose: elif self.verbose:
print(stderr) print(stderr)
return force_text(stdout) 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