-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathRules
45 lines (37 loc) · 810 Bytes
/
Rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'compass'
Compass.add_project_configuration 'config/compass.config'
compile '/assets/stylesheets/sass/partials/*/' do
# don’t compile partials
end
compile '*' do
case item[:extension]
when 'haml'
filter :haml
layout 'default'
when 'textile'
filter :redcloth
layout 'default'
when 'sass'
filter :sass, Compass.sass_engine_options
filter :relativize_paths, :type => :css
when 'js'
# filter :minify
end
end
route '/assets/*/' do
if item.identifier =~ /\/_/
nil
else
if item[:extension] == 'sass'
item.identifier.chop + '.css'
else
item.identifier.chop+'.'+item[:extension]
end
end
end
route '*' do
item.identifier + 'index.html'
end
layout '*', :haml