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

CSS watcher #680

Merged
merged 1 commit into from
Mar 14, 2014
Merged

CSS watcher #680

merged 1 commit into from
Mar 14, 2014

Conversation

osfameron
Copy link
Contributor

Run with bin/make_css_watch

This watches the .scss files in web/cobrands/* and runs the appropriate
sass/compass commands (as per bin/make_css) on just those directories
with changed files.

@dracos
Copy link
Member

dracos commented Mar 12, 2014

I rebased this on current master, removed trailing spaces, and moved a bracket to a different line to match the coding standard, in order to merge. However, I now realise that this won't work properly if e.g. one of the files in web/cobrands/sass is modified - which should cause all of the compass directories to update as they all include those files.

Note that compass has a built in "watch" facility that also fails to spot changes to included files (sigh, why have it at all then?), so if this could do that that would be an improvement :)

@osfameron
Copy link
Contributor Author

Hmm, good point.

Simplest thing would be to special case changes in web/cobrands/{sass,default}?

Most general thing would be to do a rough parse (with a CPAN module, or just regexp search for @include) of all the .scss files and do a simple dependency graph. As you say, this is the kind of thing that compass really ought to get right (given it already knows how to parse .sass files..., sigh).

@dracos
Copy link
Member

dracos commented Mar 13, 2014

Yeah, just web/cobrands/sass, I think, default is a cobrand like all the others. Don't think it's worth doing anything more.

Run with bin/make_css_watch

This watches the .scss files in web/cobrands/* and runs the appropriate
sass/compass commands (as per bin/make_css) on just those directories
with changed files.

As a special case, a change to the partials in web/cobrands/sass will
cause a rebuild of all cobrands.
@osfameron
Copy link
Contributor Author

@dracos ok, pushed version to handle that case.

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

2 participants