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

Changed include files are not recompiling on page load without changed to master file #8

Open
GregHausheer opened this issue Jan 6, 2014 · 1 comment

Comments

@GregHausheer
Copy link

Given this:

PIPELINE_CSS = {
'screen': {
'source_filenames': (
'css/*.css',
'sass/main.scss',
),
'output_filename': 'css/screen.css',
'variant': 'datauri',
'extra_context': {
'media': 'screen,projection',
},
},
}

PIPELINE_COMPILERS = (
'pipeline.compilers.coffee.CoffeeScriptCompiler',
'pipeline_compass.compiler.CompassCompiler',
)

And scss file main.scss

@import "compass/css3";
@import "nav";

And the scss file _nav.scss

.navbar {
background-color:$ghost;
}

Changing "background-color:$ghost" to "background-color:red" does not cause a change in the compiled output until saving main.scss after saving _nav.scss.

ie, change nav, save nav does not work, but change nav, save nav, and then save main works.

@hheimbuerger
Copy link

I had the same issue, here's my hotfix (just always forces a recompile):

class ForceRebuildCompassCompiler(CompassCompiler):
    def compile_file(self, content, path, force=False, outdated=False):
        force = True
        super(ForceRebuildCompassCompiler, self).compile_file(content, path, force, outdated)

And then I refer to that instead in my django-pipeline configuration:

PIPELINE = {
    'COMPILERS': (
        'myproj.apps.ForceRebuildCompassCompiler',
    ),
    # […]
}

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