2010-01-21 06:25:44 +00:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
|
|
|
|
require 'compass'
|
|
|
|
|
|
|
|
Compass.configuration.parse "#{File.dirname(__FILE__)}/.compass/config.rb"
|
|
|
|
|
2010-01-23 09:08:00 +00:00
|
|
|
compile '/css/*/' do
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
|
|
|
|
compile '/javascripts/*/' do
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
|
2010-01-21 06:25:44 +00:00
|
|
|
compile '/stylesheets/*/' do
|
|
|
|
filter :sass, Compass.sass_engine_options
|
|
|
|
end
|
|
|
|
|
|
|
|
compile '*' do
|
2010-01-23 02:15:04 +00:00
|
|
|
filter :haml, :ugly => true
|
2010-01-21 06:25:44 +00:00
|
|
|
layout 'default'
|
|
|
|
end
|
|
|
|
|
|
|
|
route '/stylesheets/_*/' do
|
|
|
|
# don't output partials, so return nil
|
|
|
|
nil
|
|
|
|
end
|
2010-01-23 09:08:00 +00:00
|
|
|
|
|
|
|
route '/css/*/' do
|
|
|
|
item.identifier.chop.gsub(%r{/css}, '/stylesheets')+"."+item[:extension]
|
|
|
|
end
|
|
|
|
|
|
|
|
route '/javascripts/*/' do
|
|
|
|
item.identifier.chop.gsub(%r{/css}, '/javascripts')+"."+item[:extension]
|
|
|
|
end
|
|
|
|
|
2010-01-21 06:25:44 +00:00
|
|
|
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
|
|
|
|
|
2010-01-23 02:15:04 +00:00
|
|
|
layout '*', :haml, :ugly => true
|