compass/doc-src/Rules
2010-01-24 01:34:05 -08:00

55 lines
902 B
Ruby

#!/usr/bin/env ruby
require 'compass'
Compass.configuration.parse "#{File.dirname(__FILE__)}/.compass/config.rb"
compile '/css/*/' do
nil
end
compile '/images/*/' do
nil
end
compile '/javascripts/*/' do
nil
end
compile '/stylesheets/*/' do
filter :sass, Compass.sass_engine_options
end
compile '*' do
filter :haml, :ugly => true
layout 'default'
end
route '/stylesheets/_*/' do
# don't output partials, so return nil
nil
end
route '/css/*/' do
item.identifier.chop.gsub(%r{/css}, '/stylesheets')+"."+item[:extension]
end
route '/images/*/' do
item.identifier.chop+"."+item[:extension]
end
route '/javascripts/*/' do
item.identifier.chop+"."+item[:extension]
end
route '/stylesheets/*/' do
# don't generate a directory like we do for HTML files
item.identifier.chop + '.css'
end
route '*' do
item.identifier + 'index.html'
end
layout '*', :haml, :ugly => true