middleman/middleman — pull request #228 by bhollis (2013-04-05 07:31:05+00:00)
Title: Compass sprites don't work great

I'm trying to use Compass' [sprite support](http://compass-style.org/help/tutorials/spriting/) in one of my Middleman projects. For example, I have a directory `source/images/icon` which contains some images, and then a Sass file with:

```sass
@import "icon/*.png"
@include all-icon-sprites
```

When I run `middleman build`, the icon sprite (named something like `icon-s4f7554543b.png`) is produced in the source directory (`source/images/icon/icon-s4f7554543b.png`) instead of the build directory. I can sort of work around this by building twice - the first time puts the sprite in source, and the second time copies the sprite into the build directory.

I suspect that the Compass defaults could be tweaked to get the sprites to appear in the build directory instead of the source, though I haven't yet been able to figure out exactly what to change. One complication is that the sprite image would need to also have a sitemap entry so that `build --clean` won't just remove it on the next build.

I haven't put together a test case or test project because the problem is pretty straightforward to reproduce, but I could do so if you wanted.