Skip to content

kayode-adechinan/dj-purge-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gulp taks and Purge CSS integration with django

This simple project is a starter for integrating various gulp taks and purge css with django

How to use

Build for prod

$ python manage.py gulp

Update templates

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>

How it works

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

Gulp commands use

  • purge (the most important indeed)

TO DO

Add the following taks

  • css min
  • js min
  • image min
  • sass
  • clean css
  • autoprefixer

About

gulp tasks and purge css integration with django

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published