forked from htmlzengarden/outline
/
config.rb
executable file
·53 lines (39 loc) · 1.3 KB
/
config.rb
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
46
47
48
49
50
51
52
53
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "assets/css"
sass_dir = "scss"
images_dir = "assets/img"
javascripts_dir = "assets/js"
fonts_dir = "assets/fonts"
# Number of decimals after commas, useful for em accuracy
Sass::Script::Number.precision = 8
# For those who use Growl to get notifications about Compass compiling
#require "compass-growl"
# Set the project's environment
# environment = :development
environment = :production
if environment == :production
output_style = :compressed
else
output_style = :expanded
#sass_options = { :debug_info => true }
end
# To enable relative paths to assets via compass helper functions. Uncomment:
relative_assets = true
line_comments = false
color_output = false
# Copy each sprite generated by Compass without the hash
on_sprite_saved do |filename|
if File.exists?(filename)
FileUtils.cp filename, filename.gsub(%r{-s[a-z0-9]{10}\.png$}, '.png')
end
end
# Replace references to the previous sprite name in CSS by the new, hash-free sprite names
on_stylesheet_saved do |filename|
if File.exists?(filename)
css = File.read filename
File.open(filename, 'w+') do |f|
f << css.gsub(%r{-s[a-z0-9]{10}\.png}, '.png')
end
end
end