Module: Compass::Configuration::Defaults

Defined in:
lib/compass/configuration/defaults.rb

Instance Method Summary collapse

Instance Method Details

#default_cacheObject



147
148
149
# File 'lib/compass/configuration/defaults.rb', line 147

def default_cache
  true
end

#default_cache_pathObject



89
90
91
92
93
# File 'lib/compass/configuration/defaults.rb', line 89

def default_cache_path
  if (pp = top_level.project_path) && (dir = top_level.cache_dir)
    Compass.projectize(dir, pp)
  end
end

#default_chunky_png_optionsObject



159
160
161
# File 'lib/compass/configuration/defaults.rb', line 159

def default_chunky_png_options
  {:compression => Zlib::BEST_COMPRESSION}
end

#default_color_outputObject



41
42
43
# File 'lib/compass/configuration/defaults.rb', line 41

def default_color_output
  true
end

#default_css_pathObject



51
52
53
54
55
# File 'lib/compass/configuration/defaults.rb', line 51

def default_css_path
  if (pp = top_level.project_path) && (dir = top_level.css_dir)
    Compass.projectize(dir, pp)
  end
end

#default_environmentObject



25
26
27
# File 'lib/compass/configuration/defaults.rb', line 25

def default_environment
  :development
end

#default_extensions_dirObject



17
18
19
# File 'lib/compass/configuration/defaults.rb', line 17

def default_extensions_dir
  "extensions"
end

#default_extensions_pathObject



77
78
79
80
81
# File 'lib/compass/configuration/defaults.rb', line 77

def default_extensions_path
  if (pp = top_level.project_path) && (dir = top_level.extensions_dir)
    Compass.projectize(dir, pp)
  end
end

#default_fonts_dirObject



21
22
23
# File 'lib/compass/configuration/defaults.rb', line 21

def default_fonts_dir
  File.join(top_level.css_dir, "fonts")
end

#default_fonts_pathObject



83
84
85
86
87
# File 'lib/compass/configuration/defaults.rb', line 83

def default_fonts_path
  if (pp = top_level.project_path) && (dir = top_level.fonts_dir)
    Compass.projectize(dir, pp)
  end
end

#default_generated_images_dirObject



95
96
97
# File 'lib/compass/configuration/defaults.rb', line 95

def default_generated_images_dir
  top_level.images_dir
end

#default_generated_images_pathObject



63
64
65
66
67
68
69
# File 'lib/compass/configuration/defaults.rb', line 63

def default_generated_images_path
  if (pp = top_level.project_path) && (dir = top_level.generated_images_dir)
    Compass.projectize(dir, pp)
  else
    top_level.images_path
  end
end

#default_http_fonts_dirObject



127
128
129
130
131
132
133
# File 'lib/compass/configuration/defaults.rb', line 127

def default_http_fonts_dir
  if fd = top_level.fonts_dir_without_default
    fd
  else
    "#{top_level.http_stylesheets_dir}/fonts"
  end
end

#default_http_fonts_pathObject



135
136
137
# File 'lib/compass/configuration/defaults.rb', line 135

def default_http_fonts_path
  http_root_relative top_level.http_fonts_dir
end

#default_http_generated_images_dirObject



99
100
101
# File 'lib/compass/configuration/defaults.rb', line 99

def default_http_generated_images_dir
  top_level.http_images_dir
end

#default_http_generated_images_pathObject



123
124
125
# File 'lib/compass/configuration/defaults.rb', line 123

def default_http_generated_images_path
  http_root_relative top_level.http_generated_images_dir
end

#default_http_images_dirObject



103
104
105
# File 'lib/compass/configuration/defaults.rb', line 103

def default_http_images_dir
  top_level.images_dir
end

#default_http_images_pathObject



111
112
113
# File 'lib/compass/configuration/defaults.rb', line 111

def default_http_images_path
  http_root_relative top_level.http_images_dir
end

#default_http_javascripts_dirObject



139
140
141
# File 'lib/compass/configuration/defaults.rb', line 139

def default_http_javascripts_dir
  top_level.javascripts_dir
end

#default_http_javascripts_pathObject



143
144
145
# File 'lib/compass/configuration/defaults.rb', line 143

def default_http_javascripts_path
  http_root_relative top_level.http_javascripts_dir
end

#default_http_pathObject



13
14
15
# File 'lib/compass/configuration/defaults.rb', line 13

def default_http_path
  "/"
end

#default_http_stylesheets_dirObject



115
116
117
# File 'lib/compass/configuration/defaults.rb', line 115

def default_http_stylesheets_dir
  top_level.css_dir
end

#default_http_stylesheets_pathObject



119
120
121
# File 'lib/compass/configuration/defaults.rb', line 119

def default_http_stylesheets_path
  http_root_relative top_level.http_stylesheets_dir
end

#default_images_pathObject



57
58
59
60
61
# File 'lib/compass/configuration/defaults.rb', line 57

def default_images_path
  if (pp = top_level.project_path) && (dir = top_level.images_dir)
    Compass.projectize(dir, pp)
  end
end

#default_javascripts_pathObject



71
72
73
74
75
# File 'lib/compass/configuration/defaults.rb', line 71

def default_javascripts_path
  if (pp = top_level.project_path) && (dir = top_level.javascripts_dir)
    Compass.projectize(dir, pp)
  end
end

#default_line_commentsObject



37
38
39
# File 'lib/compass/configuration/defaults.rb', line 37

def default_line_comments
  top_level.environment == :development
end

#default_output_styleObject



29
30
31
32
33
34
35
# File 'lib/compass/configuration/defaults.rb', line 29

def default_output_style
  if top_level.environment == :development
    :expanded
  else
    :compressed
  end
end

#default_preferred_syntaxObject



151
152
153
# File 'lib/compass/configuration/defaults.rb', line 151

def default_preferred_syntax
  :scss
end

#default_project_pathObject



5
6
7
# File 'lib/compass/configuration/defaults.rb', line 5

def default_project_path
  "."
end

#default_project_typeObject



9
10
11
# File 'lib/compass/configuration/defaults.rb', line 9

def default_project_type
  :stand_alone
end

#default_sass_pathObject



45
46
47
48
49
# File 'lib/compass/configuration/defaults.rb', line 45

def default_sass_path
  if (pp = top_level.project_path) && (dir = top_level.sass_dir)
    Compass.projectize(dir, pp)
  end
end

#default_sprite_engineObject



155
156
157
# File 'lib/compass/configuration/defaults.rb', line 155

def default_sprite_engine
  :chunky_png
end

#default_sprite_load_pathObject



107
108
109
# File 'lib/compass/configuration/defaults.rb', line 107

def default_sprite_load_path
  [top_level.images_path]
end

#http_join(*segments) ⇒ Object

helper functions



165
166
167
168
169
170
171
# File 'lib/compass/configuration/defaults.rb', line 165

def http_join(*segments)
  segments.map do |segment|
    next unless segment
    segment = http_pathify(segment)
    segment[-1..-1] == "/" ? segment[0..-2] : segment
  end.join("/")
end

#http_pathify(path) ⇒ Object



173
174
175
176
177
178
179
# File 'lib/compass/configuration/defaults.rb', line 173

def http_pathify(path)
  if File::SEPARATOR == "/"
    path
  else
    path.gsub(File::SEPARATOR, "/")
  end
end

#http_root_relative(path) ⇒ Object



181
182
183
# File 'lib/compass/configuration/defaults.rb', line 181

def http_root_relative(path)
  http_join top_level.http_path, path
end