Skip to content
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

Django sass process 622 #629

Closed
wants to merge 4 commits into from
Closed

Conversation

groovecoder
Copy link
Member

I'm happy to wait on this, but I wanted to put it up here for consideration ...

This includes #625 and adds django-sass-processor so we can just keep .scss files in the repo, and let django-sass-processor compile the .css files during deployment release.

The alternative to this is either:

  1. Check the compiled .css files into the repo and hope we don't forget them each time
  2. Use Heroku Buildpack Multi to compile the .scss files into .css with Ruby sass command

@@ -11,7 +12,7 @@
<link rel="shortcut icon" href="{% static "img/favicon.png" %}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/foundation/6.2.4/foundation.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/foundation-icons/3.0/foundation-icons.min.css">
<link rel="stylesheet" href="{% static "css/codesy-home.css" %}">
<link rel="stylesheet" href="{% sass_src "css/scss/codesy-home.scss" %}">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sass_src automatically converts this to look for the compiled .css file.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 90.197% when pulling e1a3fce on django-sass-process-622 into 8d556ac on master.

Copy link
Collaborator

@maxxcrawford maxxcrawford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the development process when you're working on local changes with the Django tool? Do we still leave the README the same for now, or reference the offline compile option from the Django-sass-processor documentation?

@groovecoder
Copy link
Member Author

As I understand it, django-sass-processor automatically compiles the .sass into the .css every time it's included in a template. So the local development process is just to save the .sass file and reload the page.

This PR also adds a new release-tasks.sh script for heroku to run python manage.py compilescss after it runs the db migrations. So during the stage & production deploys, we compile the sass "offline".

@maxxcrawford
Copy link
Collaborator

10-4. This is good by me!

@groovecoder groovecoder closed this Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants