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

Force recompile needed when dealing with sass @import files #16

Open
jasford opened this issue Jul 30, 2010 · 1 comment
Open

Force recompile needed when dealing with sass @import files #16

jasford opened this issue Jul 30, 2010 · 1 comment

Comments

@jasford
Copy link

jasford commented Jul 30, 2010

If you have a file, say main.sass, that pulls in things like _typography.sass and _header.sass like this:

@import typography.sass
@import header.sass

Django-css does not pick up on these changes because it is only checking the timestamp of main.sass and doesn't look at any included files. To get around it, you have to add a blank line, then remove it from main.sass or just manually compile the sass yourself at the command line, neither of which are ideal.

I created a patch to solve the problem by simply adding a COMPRESS_FORCE_RECOMPILE optional setting. It defaults to False, which keeps everything running as it used to, but if you set it to True in your Django settings, it forces the recompile every time. Use case is to set it to True just before making a bunch of Sass changes, then change the setting back when done. Or just leave it on all the time in a dev environment if speed is not a big issue.

Here's the patch: http://gist.github.com/500673

@alexcabrera
Copy link

Just applied this patch and it works great. This needs to be committed to the master branch. SASS's import system is crucial creating maintainable code.

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

No branches or pull requests

2 participants