Module: Compass::Configuration::Defaults

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

Instance Method Summary collapse

Instance Method Details

#default_color_outputObject



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

def default_color_output
  true
end

#default_css_pathObject



47
48
49
50
51
# File 'lib/compass/configuration/defaults.rb', line 47

def default_css_path
  if (pp = top_level.project_path) && (dir = top_level.css_dir)
    File.join(pp, dir)
  end
end

#default_environmentObject



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

def default_environment
  :development
end

#default_extensions_dirObject



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

def default_extensions_dir
  "extensions"
end

#default_extensions_pathObject



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

def default_extensions_path
  if (pp = top_level.project_path) && (dir = top_level.extensions_dir)
    File.join(pp, dir)
  end
end

#default_fonts_dirObject



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

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

#default_fonts_pathObject



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

def default_fonts_path
  if (pp = top_level.project_path) && (dir = top_level.fonts_dir)
    File.join(pp, dir)
  end
end

#default_http_fonts_dirObject



94
95
96
97
98
99
100
# File 'lib/compass/configuration/defaults.rb', line 94

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



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

def default_http_fonts_path
  http_root_relative top_level.http_fonts_dir
end

#default_http_images_dirObject



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

def default_http_images_dir
  top_level.images_dir
end

#default_http_images_pathObject



82
83
84
# File 'lib/compass/configuration/defaults.rb', line 82

def default_http_images_path
  http_root_relative top_level.http_images_dir
end

#default_http_javascripts_dirObject



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

def default_http_javascripts_dir
  top_level.javascripts_dir
end

#default_http_javascripts_pathObject



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

def default_http_javascripts_path
  http_root_relative top_level.http_javascripts_dir
end

#default_http_stylesheets_dirObject



86
87
88
# File 'lib/compass/configuration/defaults.rb', line 86

def default_http_stylesheets_dir
  top_level.css_dir
end

#default_http_stylesheets_pathObject



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

def default_http_stylesheets_path
  http_root_relative top_level.http_stylesheets_dir
end

#default_images_pathObject



53
54
55
56
57
# File 'lib/compass/configuration/defaults.rb', line 53

def default_images_path
  if (pp = top_level.project_path) && (dir = top_level.images_dir)
    File.join(pp, dir)
  end
end

#default_javascripts_pathObject



59
60
61
62
63
# File 'lib/compass/configuration/defaults.rb', line 59

def default_javascripts_path
  if (pp = top_level.project_path) && (dir = top_level.javascripts_dir)
    File.join(pp, dir)
  end
end

#default_line_commentsObject



33
34
35
# File 'lib/compass/configuration/defaults.rb', line 33

def default_line_comments
  top_level.environment == :development
end

#default_output_styleObject



25
26
27
28
29
30
31
# File 'lib/compass/configuration/defaults.rb', line 25

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

#default_project_typeObject



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

def default_project_type
  :stand_alone
end

#default_sass_pathObject



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

def default_sass_path
  if (pp = top_level.project_path) && (dir = top_level.sass_dir)
    File.join(pp, dir)
  end
end

#http_join(*segments) ⇒ Object

helper functions



116
117
118
119
120
121
122
# File 'lib/compass/configuration/defaults.rb', line 116

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_path_without_defaultObject



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

def http_path_without_default
  "/"
end

#http_pathify(path) ⇒ Object



124
125
126
127
128
129
130
# File 'lib/compass/configuration/defaults.rb', line 124

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

#http_root_relative(path) ⇒ Object



132
133
134
# File 'lib/compass/configuration/defaults.rb', line 132

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