cyberdelia/django-pipeline — pull request #355 by Kazanz (2014-07-01 23:23:14+00:00)
Title: No Op Compressor for debugging faulty concatenation.

Sometimes JS is poorly written and lacking the proper semicolons. If one file does not end in a semi-colon and the next one doesn't start with one, they will run together and not work properly.

To easily debug this is an issue with concatenation and not with the compressor one needs a simple way to just concatenate static assets. Without a built-in compressor, one would have the chore of writing a NoOp compressor python and have it pollute the project in a random folder or file. Because of that having a built in NoOp compressor solves two problems. It keeps the project cleaner and also provides a steadier workflow for debugging.

The NoOp (No Operation) compressor included in this PR is just an empty compressor. This gives the option of temporarily running concatenation without compression. It is easy to use. Just adjust the django settings to:

PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.no_op.NoOpCompressor'

The NoOp is also available for css if needed.

Note:
There may be a potential issue with the naming of the compressor class. Perhaps 'BlankCompressor' or 'EmptyCompressor' is more appropriate. Maybe, Maybe Not?

If there is anything that needs changes or modifications before merging, let me know. Thanks.