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
efefc119
Commit
efefc119
authored
Mar 09, 2012
by
Steven Cummings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cssmin compressor including doc; and a correction to the sample custom compressor
parent
99de2c10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
docs/compressors.rst
+12
-0
pipeline/compressors/cssmin/__init__.py
+13
-0
No files found.
docs/compressors.rst
View file @
efefc119
...
...
@@ -142,6 +142,18 @@ To us it for your stylesheets add this to your ``PIPELINE_CSS_COMPRESSOR`` ::
Default to ``'--template=highest'``
cssmin compressor
=================
The cssmin compressor uses the `cssmin <http://pypi.python.org/pypi/cssmin/>`_
Python library to compress stylesheets. To use it, specify this
``PIPELINE_CSS_COMPRESSOR`` ::
PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.cssmin.CssminCompressor'
Install the cssmin library with your favorite Python package manager. E.g. ::
pip install cssmin
Write your own compressor class
===============================
...
...
pipeline/compressors/cssmin/__init__.py
0 → 100644
View file @
efefc119
from
pipeline.compressors
import
CompressorBase
class
CssminCompressor
(
CompressorBase
):
"""
CSS compressor based on the Python library cssmin
(http://pypi.python.org/pypi/cssmin/).
"""
def
compress_css
(
self
,
css
):
from
cssmin
import
cssmin
return
cssmin
(
css
)
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