compass/doc-src/Rules

68 lines
1.1 KiB
Ruby

#!/usr/bin/env ruby
require 'compass'
Compass.configuration.parse "#{File.dirname(__FILE__)}/.compass/config.rb"
compile '/assets/*/' do
nil
end
compile '/examples/*/markup/' do
nil
end
compile '/examples/*/stylesheet/' do
nil
end
compile '/examples/*/' do
filter :haml, :ugly => true
layout 'example'
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 '/assets/css/*/' do
"/stylesheets"+item.identifier.chop[11..-1]+"."+item[:extension]
end
route '/assets/images/*/' do
item.identifier.chop[7..-1]+"."+item[:extension]
end
route '/assets/javascripts/*/' do
item.identifier.chop[7..-1]+"."+item[:extension]
end
route '/stylesheets/*/' do
# don't generate a directory like we do for HTML files
item.identifier.chop + '.css'
end
route '/examples/*/markup/' do
nil
end
route '/examples/*/stylesheet/' do
nil
end
route '*' do
item.identifier + 'index.html'
end
layout '*', :haml, :ugly => true