Class: Awestruct::Compass::DefaultConfiguration
- Inherits:
-
Compass::Configuration::Data
- Object
- Compass::Configuration::Data
- Awestruct::Compass::DefaultConfiguration
- Defined in:
- lib/awestruct/compass/default_configuration.rb
Instance Attribute Summary collapse
-
#site ⇒ Object
readonly
Returns the value of attribute site.
Instance Method Summary collapse
- #default_cache_dir ⇒ Object
- #default_css_dir ⇒ Object
- #default_environment ⇒ Object
- #default_fonts_dir ⇒ Object
- #default_generated_images_dir ⇒ Object
- #default_http_fonts_dir ⇒ Object
- #default_http_generated_images_dir ⇒ Object
- #default_http_images_dir ⇒ Object
- #default_http_javascripts_dir ⇒ Object
- #default_http_path ⇒ Object
- #default_http_stylesheets_dir ⇒ Object
- #default_images_dir ⇒ Object
- #default_images_path ⇒ Object
- #default_javascripts_dir ⇒ Object
- #default_project_path ⇒ Object
- #default_project_type ⇒ Object
- #default_relative_assets ⇒ Object
- #default_sass_dir ⇒ Object
- #default_sprite_load_path ⇒ Object
-
#initialize(site) ⇒ DefaultConfiguration
constructor
A new instance of DefaultConfiguration.
- #line_comments ⇒ Object
- #output_style ⇒ Object
Constructor Details
#initialize(site) ⇒ DefaultConfiguration
Returns a new instance of DefaultConfiguration.
9 10 11 |
# File 'lib/awestruct/compass/default_configuration.rb', line 9 def initialize site @site = site end |
Instance Attribute Details
#site ⇒ Object (readonly)
Returns the value of attribute site.
7 8 9 |
# File 'lib/awestruct/compass/default_configuration.rb', line 7 def site @site end |
Instance Method Details
#default_cache_dir ⇒ Object
125 126 127 |
# File 'lib/awestruct/compass/default_configuration.rb', line 125 def default_cache_dir File.join site.config.dir, '.sass-cache' end |
#default_css_dir ⇒ Object
33 34 35 |
# File 'lib/awestruct/compass/default_configuration.rb', line 33 def default_css_dir File.join site.output_dir, 'stylesheets' end |
#default_environment ⇒ Object
17 18 19 |
# File 'lib/awestruct/compass/default_configuration.rb', line 17 def default_environment site.profile end |
#default_fonts_dir ⇒ Object
73 74 75 |
# File 'lib/awestruct/compass/default_configuration.rb', line 73 def default_fonts_dir File.join site.config.dir, 'fonts' end |
#default_generated_images_dir ⇒ Object
53 54 55 |
# File 'lib/awestruct/compass/default_configuration.rb', line 53 def default_generated_images_dir File.join site.output_dir, 'images' end |
#default_http_fonts_dir ⇒ Object
77 78 79 |
# File 'lib/awestruct/compass/default_configuration.rb', line 77 def default_http_fonts_dir File.join http_path, 'fonts' end |
#default_http_generated_images_dir ⇒ Object
57 58 59 |
# File 'lib/awestruct/compass/default_configuration.rb', line 57 def default_http_generated_images_dir File.join http_path, 'images' end |
#default_http_images_dir ⇒ Object
69 70 71 |
# File 'lib/awestruct/compass/default_configuration.rb', line 69 def default_http_images_dir File.join http_path, 'images' end |
#default_http_javascripts_dir ⇒ Object
41 42 43 |
# File 'lib/awestruct/compass/default_configuration.rb', line 41 def default_http_javascripts_dir File.join http_path, 'javascripts' end |
#default_http_path ⇒ Object
29 30 31 |
# File 'lib/awestruct/compass/default_configuration.rb', line 29 def default_http_path site.base_url end |
#default_http_stylesheets_dir ⇒ Object
45 46 47 |
# File 'lib/awestruct/compass/default_configuration.rb', line 45 def default_http_stylesheets_dir File.join http_path, 'stylesheets' end |
#default_images_dir ⇒ Object
49 50 51 |
# File 'lib/awestruct/compass/default_configuration.rb', line 49 def default_images_dir File.join site.config.dir, 'images' end |
#default_images_path ⇒ Object
65 66 67 |
# File 'lib/awestruct/compass/default_configuration.rb', line 65 def default_images_path File.join project_path, 'images' end |
#default_javascripts_dir ⇒ Object
37 38 39 |
# File 'lib/awestruct/compass/default_configuration.rb', line 37 def default_javascripts_dir File.join site.config.dir, 'javascripts' end |
#default_project_path ⇒ Object
21 22 23 |
# File 'lib/awestruct/compass/default_configuration.rb', line 21 def default_project_path site.config.dir end |
#default_project_type ⇒ Object
13 14 15 |
# File 'lib/awestruct/compass/default_configuration.rb', line 13 def default_project_type :stand_alone end |
#default_relative_assets ⇒ Object
121 122 123 |
# File 'lib/awestruct/compass/default_configuration.rb', line 121 def default_relative_assets false end |
#default_sass_dir ⇒ Object
25 26 27 |
# File 'lib/awestruct/compass/default_configuration.rb', line 25 def default_sass_dir File.join site.config.dir, 'stylesheets' end |
#default_sprite_load_path ⇒ Object
61 62 63 |
# File 'lib/awestruct/compass/default_configuration.rb', line 61 def default_sprite_load_path [images_path] end |
#line_comments ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/awestruct/compass/default_configuration.rb', line 81 def line_comments if self.inherited_data && self.inherited_data.is_a?(::Compass::Configuration::FileData) return self.inherited_data.line_comments end if site.profile.eql? 'production' return false else if site.key? :compass_line_comments return site.compass_line_comments end if site.key?(:scss) && site.scss.key?(:line_comments) return site.scss.line_comments end if site.key?(:sass) && site.sass.key?(:line_comments) return site.sass.line_comments end true end end |
#output_style ⇒ Object
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/awestruct/compass/default_configuration.rb', line 101 def output_style if self.inherited_data && self.inherited_data.is_a?(::Compass::Configuration::FileData) return self.inherited_data.output_style end if site.profile.eql? 'production' return :compressed else if site.key? :compass_output_style return site.compass_output_style end if (site.key? :scss) && (site.scss.key? :style) return site.scss.style end if (site.key? :sass) && (site.sass.key? :style) return site.sass.style end end :expanded end |