9

有什么方法可以配置 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

更新

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

1 回答 1

1

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

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

于 2014-11-19T15:09:12.773 回答