Comments (10)
But then django-compressor becomes a hard dependency. Currently that's optional.
The most important feature now, are unit tests. When I started, I was in a real hurry and that project was not intended to become what it is now. Normally I add unit tests right from the beginning.
from django-sass-processor.
Currently the readme states:
django-compressor is required only for offline compilation, when using the command manage.py compilescss.
Won't it still be 'optional' in the same way (only required for offline use)? We're currently importing it in compilescss.py
anyhow.
from django-sass-processor.
@AndreasBackx I think I've added --engine jinja2
switch a year ago just "because it was easy". Is it not working anymore? (I'm not using jinja2 at the moment but thinking about it).
And yeah, django-compressor is actually not a very good thing to depend on - they have history of making breaking changes in their code with no good reason (like #45, it's still open with no reaction from their side). Maybe the better idea is right opposite - remove this dependency altogether. Just copy their django template walker and be done with it?
from django-sass-processor.
@frostbtn it wasn't working for me. It's been about 2 weeks since I looked into it so I cannot really remember it. As I'm currently no longer using a Jinja2 environment, but am using django-jinja I cannot check what caused it. But in any case support for django-jinja should perhaps also be added.
I would still say that we should depend on it as most of our users would benefit from using django-compressor and are perhaps already using it like I am. We could always keep the version locked to a specific version in case of a breaking change and make it work later on. I doubt there are gonna be a lot of big breaking changes.
from django-sass-processor.
can we close this?
from django-sass-processor.
@jrief I'll give it a look the coming weeks. Currently pretty busy.
from django-sass-processor.
It's been a while since I looked at the django-compressor part of the code. But could you explain to me why we need the django-compressor? Can't we simply find all of the scss
files and compile them so they're available or am I missing something here?
from django-sass-processor.
In some sense django-compressor and libsass are complementary indeed, since they both compress the CSS files. In addition to that, django-compressor concatenates all CSS files included by your HTML file.
Here I use Sekizai in combination with Compressor. For example:
{% load sekizai_tags %}
...
<head>
...
{% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %}
</head>
If you use SCSS files exclusively and if you use only one SCSS file per HTML file (you can use @import "...";
to achieve the same effect), then compressor is redundant indeed.
from django-sass-processor.
Doesn't the following work?
{% compress css %}
<link rel="stylesheet" href="{% sass_src 'one.scss' %}" type="text/css" charset="utf-8">
<link rel="stylesheet" href="{% sass_src 'two.scss' %}" type="text/css" charset="utf-8">
{% endcompress %}
from django-sass-processor.
Maybe? I only use django-compress in combination with django-sekizai, hence I don't know.
from django-sass-processor.
Related Issues (20)
- Auto-compile stops for unknown reason HOT 2
- FILE_CHARSET is removed in Django 3.1 HOT 3
- LibSass is deprecated HOT 3
- Remove note about Django 3.0 compatibility from the readme HOT 1
- Q: Compile to media storage instead of static? HOT 11
- sass_inline HOT 7
- Invalid setting 'base_url' for S3StaticStorage (from django-storages) HOT 4
- import statement in SCSS file not working with v1.0.1 HOT 1
- Compilescss failed with a lot of "non sense" errors HOT 8
- CSS not updating when DEBUG=True until I erase existing css files in Docker container HOT 1
- sequence item 1: expected str instance, WindowsPath found HOT 4
- Regression: Use of custom storages broken HOT 11
- Why does compilescss create two files HOT 1
- TypeError when using Google backend from django-storages HOT 1
- Web Page Rendering After Installation & Installation is Messed Up HOT 2
- Import-only files are not monitored for changes HOT 7
- Deprecation of STATICFILES_STORAGE in django 4.2 HOT 1
- Third party documentation no longer available HOT 7
- Error sometimes occurs when trying to compile scss
- Broken in Django 5.1 alpha due to get_storage_class HOT 5
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-sass-processor.