-
-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question] Is it possible to get minification without having to bundle files together? #732
Comments
@nemesisdesign have you found a solution to this? I am trying to do the same thing. |
@bigbob556677 I found two possible solutions using other packages:
But I'm still using pipeline for minifying the HTML. I think it would be better to have this feature shipped in pipeline instead of having to install other packages. If the maintainers think this could be a good feature to add, let me know. |
Hi @nemesisdesign, Can you be more precise when you say "having to bundle files together"? What behavior did you want? |
This is the feature I'm looking for: https://github.com/armandtvz/django-compress-staticfiles/blob/master/compress_staticfiles/storage.py A storage class based on django |
The Django documentation say:
They don't say anything about If you really want to use from django.contrib.staticfiles.storage import ManifestFilesMixin
from pipeline.storage import PipelineMixin
class YourPipelineManifestFilesMixin(PipelineMixin, ManifestFilesMixin):
pass Then, you can use it by set in Tell me if I'm wrong, but what you don't really want should be a compressor based on Understand the actual behavior: What you should do: Example: PIPELINE = {
'PIPELINE_ENABLED': True,
# CSS config
'CSS_COMPRESSOR': 'pipeline.compressors.csshtmljsminify.CssHtmlJsMinifyCompressor',
'STYLESHEETS': {
'style1': {
'source_filenames': (
'css/style1.css',
),
'output_filename': 'css/style1.min.css',
'extra_context': {
'media': 'screen,projection',
}
},
'style2': {
'source_filenames': (
'css/style2.css',
),
'output_filename': 'css/style2.min.css',
'extra_context': {
'media': 'screen,projection',
}
},
},
# JS config
'JS_COMPRESSOR' : 'pipeline.compressors.csshtmljsminify.CssHtmlJsMinifyCompressor',
'JAVASCRIPT': {
'js1': {
'source_filenames': (
'js/js1.js',
),
'output_filename': 'css/js1.min.css',
},
'js2': {
'source_filenames': (
'js/js2.js',
),
'output_filename': 'css/js2.min.css',
},
}
} Explanation:
|
Is it possible to get minification without having to bundle files together?
I'm looking for something like the django
ManifestStaticFilesStorage
only with minification added, so I started looking if django-pipeline provides this, but it seems it doesn't.Anyone can help me clarifying this doubt?
The text was updated successfully, but these errors were encountered: