compass/doc-src/Rules
Chris Eppstein bf83b2d5b3 Getting started with the new layout:
* Added susy and css-slideshow
* Converted legacy css to scss, moved it and updated reference.
* extracted some javascript to a file so it can be shared.
2010-04-20 11:16:43 -07:00

90 lines
1.7 KiB
Ruby

#!/usr/bin/env ruby
require 'compass'
puts "Compass running from: #{Compass.lib_directory}"
Compass.add_configuration "#{File.dirname(__FILE__)}/.compass/config.rb"
SITE_ROOT = "/docs"
compile '/assets/*/' do
nil
end
['markup', 'stylesheet', 'background'].each do |ex_file|
compile "/examples/*/#{ex_file}/" do
nil
end
end
compile '/' do
filter :haml, :ugly => true
layout 'main'
end
compile '/examples/*/' do
filter :haml, :ugly => true
filter :highlight if ENV['SYNTAX']
layout 'example'
end
skip = Proc.new{nil}
sass_options = Compass.sass_engine_options
(0..5).each do |i|
compile("/stylesheets/#{'*/' * i}_*/") {nil}
end
compile '/stylesheets/*' do
filter :sass, sass_options.merge(:syntax => item[:extension].to_sym)
end
compile '/reference/*/' do
filter :haml, :ugly => true
filter :highlight if ENV['SYNTAX']
layout 'default'
end
compile '*' do
filter :haml, :ugly => true
layout 'default'
end
(0..5).each do |i|
route("/stylesheets/#{'*/' * i}_*/") {nil}
end
route '/assets/css/*/' do
"#{SITE_ROOT}/stylesheets"+item.identifier.chop[11..-1]+"."+item[:extension]
end
route '/assets/images/*/' do
SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension]
end
route '/assets/javascripts/*/' do
SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension]
end
route '/assets/fonts/*/' do
SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension]
end
route '/stylesheets/*/' do
# don't generate a directory like we do for HTML files
SITE_ROOT+item.identifier.chop + '.css'
end
['/examples/*/markup/', '/examples/*/stylesheet/', '/examples/*/background/'].each do |ex_file|
route ex_file do
nil
end
end
route '*' do
SITE_ROOT+item.identifier + 'index.html'
end
layout '*', :haml, :ugly => true