Module: Compass::Configuration::Comments

Included in:
Data
Defined in:
lib/compass/configuration/comments.rb

Overview

Comments are emitted into the configuration file when serialized and make it easier to understand for new users.

Instance Method Summary collapse

Instance Method Details

#comment_for_http_pathObject



6
7
8
9
10
11
12
# File 'lib/compass/configuration/comments.rb', line 6

def comment_for_http_path
  unless top_level.http_path_without_default
    "# Set this to the root of your project when deployed:\nhttp_path = #{top_level.http_path.to_s.inspect}\n"
  else
    ""
  end
end

#comment_for_line_commentsObject



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

def comment_for_line_comments
  if top_level.line_comments
    %q{# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false
}
  else
    ""
  end
end

#comment_for_output_styleObject



34
35
36
37
38
39
40
41
42
# File 'lib/compass/configuration/comments.rb', line 34

def comment_for_output_style
  unless top_level.output_style_without_default
    %Q{# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
}
  else
    ""
  end
end

#comment_for_preferred_syntaxObject



44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/compass/configuration/comments.rb', line 44

def comment_for_preferred_syntax
  if top_level.preferred_syntax_without_default.nil? && top_level.sass_dir
    %Q{
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass #{top_level.sass_dir} scss && rm -rf sass && mv scss sass
}
  else
    ""
  end
end

#comment_for_relative_assetsObject



14
15
16
17
18
19
20
21
22
# File 'lib/compass/configuration/comments.rb', line 14

def comment_for_relative_assets
  unless top_level.relative_assets
    %q{# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true
}
  else
    ""
  end
end