Comments (2)
I'm not convinced that this should be an own feature of the compressor, but you can override the used CSS compressor class with the COMPRESSOR_CSS_COMPRESSOR
setting. Refactoring the default CssCompressor class to easier define what should be considered a file to compress wouldn't be hard (e.g. elem_<elem_name> method hooks that could be re-implemented in an own subclass).
from django-compressor.
This is what I actually ended up doing. It was basically the exact same as the CssProcessor but allowing stylesheet/less when parsing the files and a new template that outputs the link element with a rel="stylesheet/less". This worked really well and allowed the less.js file to parse the resulting compressed file.
from django-compressor.
Related Issues (20)
- Error when using compressor.filters.jsmin.rJSMinFilter as precompiler
- Python 3.11 test failure HOT 3
- New release to have `rcssmin` and `rjsmin` Python 3.11 wheels HOT 4
- Please update readthedocs with release 4.2 and 4.3 HOT 4
- Slim down package
- Add support for django 4.2 HOT 1
- Replace deprecated imp module with importlib HOT 2
- Django's `get_storage_class` is deprecated in 4.2 HOT 4
- Releasing a new version with Django 4.2 support HOT 3
- No way to specify hashing method for JS files? HOT 1
- Disable offline compression for some scripts HOT 5
- Fix tests with Python 3.9.17, 3.10.12 and 3.11.4 HOT 7
- Dependencies are pinned HOT 1
- Dynamic SCRIPT_NAME and compressed assets HOT 8
- Getting more info when `Error parsing template` happens
- Not compatible with django-components HOT 10
- Issue with losing templates in compress command in version >=3.0.
- optional max_workers for compress command HOT 1
- 'Settings' object has no attribute 'COMPRESSORS' HOT 8
- OSSFuzz Integration HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-compressor.