Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-pipeline
Commits
337d7224
Commit
337d7224
authored
Jul 16, 2012
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #128 from brantyoung/master
add support for slimit compressor
parents
2b8dc5cb
37fb925b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
AUTHORS
+2
-0
docs/compressors.rst
+15
-0
pipeline/compressors/slimit.py
+13
-0
No files found.
AUTHORS
View file @
337d7224
...
...
@@ -36,3 +36,5 @@ or just made Pipeline more awesome.
* Steven Cummings <estebistec@gmail.com>
* Timothée Peignier <timothee.peignier@tryphon.org>
* Trey Smith <trey.smith@nasa.gov>
* Brant Young <brant.young@gmail.com>
docs/compressors.rst
View file @
337d7224
...
...
@@ -122,6 +122,21 @@ Install the jsmin library with your favorite Python package manager ::
pip install jsmin
SlimIt compressor
=================
The slimit compressor uses `SlimIt <http://slimit.org/>`_ to
compress javascripts.
To use it add this to your ``PIPELINE_JS_COMPRESSOR`` ::
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.slimit.SlimItCompressor'
Install the slimit library with your favorite Python package manager ::
pip install slimit
CSSTidy compressor
==================
...
...
pipeline/compressors/slimit.py
0 → 100644
View file @
337d7224
from
__future__
import
absolute_import
from
pipeline.compressors
import
CompressorBase
class
SlimItCompressor
(
CompressorBase
):
"""
JS compressor based on the Python library slimit
(http://pypi.python.org/pypi/slimit/).
"""
def
compress_js
(
self
,
js
):
from
slimit
import
minify
return
minify
(
js
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment