使指南针停止检查/编译精灵

Pau*_*aul 9 sprite compass-sass compass

有没有办法配置Compass,以便它不会在每次更改非精灵文件时重新编译或检查我的精灵?

我正在尝试对文件进行编辑,lists.scss但是我必须等待指南针在罗盘覆盖我的lists.css文件之前检查(我相信它的检查,可能是它的编译)一个精灵文件(多次).等待指南针检查这些精灵是我们团队耗费大量时间.

 ?  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
Run Code Online (Sandbox Code Playgroud)

UPDATE

  • Sass 3.2.19(媒体标记)
  • 指南针0.12.6(Alnilam)

小智 1

据我所知,这不是 Compass 的预期行为。Compass 会检测精灵图标的变化,然后才会重新编译精灵。

我注意到您有一个图标丢失或无法读取(“警告:在静态/图像中找不到(或无法读取)'icon-ok-32.png'”)。您能否确保将此图标放回原位或停止在 CSS 中调用它,看看这是否可以解决您的问题?

  • 我和保罗有同样的问题。问题不在于 Compass 正在重新编译精灵,而在于它正在检查更改。检查更改的过程会启动 CPU 风扇,并且需要几秒钟的时间。 (2认同)