Skip to content

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

@jasford

Description

@jasford

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions