This simple project is a starter for integrating various gulp taks and purge css with django
$ python manage.py gulp
1 - add on the top of your base.html this :
{% load theme_utils %}
2 - add the tag that populate the purged css file on prod
<head>
{% app_css %}
</head>
The gulp commands is located in core/management/commands folder and mainly do the following job
- first installs npm dependencies if not alreday exist
- run the "gulp" commands
- regenerate staticfiles folder
- purge (the most important indeed)
Add the following taks
- css min
- js min
- image min
- sass
- clean css
- autoprefixer