hasssan
3/12/2013 - 9:10 AM

config.rb

# http://stackoverflow.com/questions/10314907/getting-a-list-of-files-in-sass-compass
module Sass::Script::Functions
    def listFiles(path)
        return Sass::Script::List.new(
            Dir.glob(path.value).map! { |x| Sass::Script::String.new(File.basename(x, '.*')) },
            :comma
        )
    end
end
// http://compass-style.org/help/tutorials/spriting/magic-selectors/
// http://stackoverflow.com/questions/10314907/getting-a-list-of-files-in-sass-compass
@import "icons/*.png";
@each $file in listFiles("images/icons/*.png") {
	.#{$file} {
	// %#{$file} { for placeholder
		@include icons-sprite($file);
	}
}
# http://stackoverflow.com/questions/10314907/getting-a-list-of-files-in-sass-compass
require File.join(File.dirname(__FILE__), 'listfiles.rb')