9

Is there any way to configure Compass such that it does not recompile or check my sprites on each change of a non-sprite file?

I am trying to make edits to the file lists.scss but I have to wait for compass to check (I believe its checking, maybe its compiling) one sprite file (multiple times) before compass overwrites my lists.css file. Waiting for compass to check these sprites is costing our team a lot of time.

 ➜  proj2 git:(tU8N) ✗ compass watch
 >>> Compass is polling for changes. Press Ctrl-C to Stop.
 >>> Change detected at 21:52:39 to: lists.scss
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
     error static/sass/application.scss (Line 354 of static/sass/lists.scss: Invalid CSS after "": expected selector, was "")
 overwrite application.css
     error static/sass/lists.scss (Line 354: Invalid CSS after "": expected selector, was "")
 overwrite lists.css
 >>> Change detected at 21:52:48 to: lists.scss
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 WARNING: 'icon-ok-32.png' was not found (or cannot be read) in static/images
 overwrite application.css
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 overwrite lists.css
 >>> Change detected at 21:54:58 to: lists.scss
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 WARNING: 'icon-ok-32.png' was not found (or cannot be read) in static/images
 overwrite application.css
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 unchanged static/images/sprite-icon-s18bb1f8a7d.png
 overwrite lists.css

UPDATE

  • Sass 3.2.19 (Media Mark)
  • Compass 0.12.6 (Alnilam)
Paul
  • 1,192
  • 1
  • 11
  • 23

1 Answers1

1

This is not expected behaviour for Compass, as far as I know. Compass detects changes in your sprite icons and only then it recompiles your sprite(s).

I notice you have an icon missing or unreadable, though ("WARNING: 'icon-ok-32.png' was not found (or cannot be read) in static/images"). Could you make sure you put this icon back or stop calling it in your CSS and see if this fixes your problem?

  • 2
    I'm having the same problem as Paul. The problem is not that compass is recompiling the sprites, but just the fact that it is checking for changes. The process of checking for changes gets my CPU fan going and takes several seconds. – justspamjustin Jan 29 '15 at 19:36
  • Sorry for late reply user3170356, but putting the icon-ok-32.png back did not fix the problem. – Paul Jan 30 '15 at 03:41
  • Well, I have to say that this is a bit strange. Could you post your config.rb? Does upgrading to 0.12.7 by any chance fix your problem? Also, is there a reason why you are not using Compass version 1? – user3170356 Feb 12 '15 at 18:38