With django-pipeline, is it possible to automatically remove source files after collectstatic ?
for example :
PIPELINE_JS = {
'stats': {
'source_filenames': (
'js/jquery.js',
'js/d3.js',
'js/application.js',
),
'output_filename': 'js/stats.js',
}
}
collectstatic :
$ python manage.py collectstatic
$ ls static/js
jquery.js
d3.js
application.js
stats.js
(i don't want jquery.js, d3.js, application.js)
Django-pipeline sends signals whenever it compiles package, you can read more about this in docs, and about signals in general here. You can hook this signal like this: