compass/doc-src/Rules

79 lines
1.4 KiB
Plaintext
Raw Normal View History

2010-01-21 06:25:44 +00:00
#!/usr/bin/env ruby
require 'compass'
2010-01-31 17:43:19 +00:00
puts "Compass running from: #{Compass.lib_directory}"
Compass.add_configuration "#{File.dirname(__FILE__)}/.compass/config.rb"
2010-01-21 06:25:44 +00:00
2010-01-28 09:11:42 +00:00
SITE_ROOT = "/docs"
compile '/assets/*/' do
2010-01-24 09:34:05 +00:00
nil
end
2010-01-27 06:08:13 +00:00
compile '/examples/*/markup/' do
nil
end
compile '/examples/*/stylesheet/' do
nil
end
compile '/examples/*/' do
filter :haml, :ugly => true
2010-02-07 21:58:52 +00:00
filter :highlight if ENV['SYNTAX']
2010-01-27 06:08:13 +00:00
layout 'example'
end
2010-01-21 06:25:44 +00:00
compile '/stylesheets/*/' do
filter :sass, Compass.sass_engine_options
end
2010-02-07 21:58:52 +00:00
compile '/reference/*/' do
filter :haml, :ugly => true
filter :highlight if ENV['SYNTAX']
layout 'default'
end
2010-01-21 06:25:44 +00:00
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
2010-02-07 21:58:52 +00:00
route '/stylesheets/*/_*/' do
2010-01-21 06:25:44 +00:00
# don't output partials, so return nil
nil
end
2010-01-23 09:08:00 +00:00
route '/assets/css/*/' do
2010-01-28 09:11:42 +00:00
"#{SITE_ROOT}/stylesheets"+item.identifier.chop[11..-1]+"."+item[:extension]
2010-01-23 09:08:00 +00:00
end
route '/assets/images/*/' do
2010-01-28 09:11:42 +00:00
SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension]
2010-01-24 09:34:05 +00:00
end
route '/assets/javascripts/*/' do
2010-01-28 09:11:42 +00:00
SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension]
2010-01-23 09:08:00 +00:00
end
2010-01-21 06:25:44 +00:00
route '/stylesheets/*/' do
# don't generate a directory like we do for HTML files
2010-01-28 09:11:42 +00:00
SITE_ROOT+item.identifier.chop + '.css'
2010-01-21 06:25:44 +00:00
end
2010-01-27 06:08:13 +00:00
route '/examples/*/markup/' do
nil
end
route '/examples/*/stylesheet/' do
nil
end
2010-01-21 06:25:44 +00:00
route '*' do
2010-01-28 09:11:42 +00:00
SITE_ROOT+item.identifier + 'index.html'
2010-01-21 06:25:44 +00:00
end
2010-01-23 02:15:04 +00:00
layout '*', :haml, :ugly => true