0
@@ -20,19 +20,29 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir)
0
-# Sass can be used in two ways:
0
-# As a plugin for Ruby on Rails
0
-# and as a standalone parser.
0
+# Sass can be used in several ways:
0
+# As a plugin for Ruby on Rails or Merb,
0
+# or as a standalone parser.
0
# Sass is bundled with Haml,
0
# so if the Haml plugin or RubyGem is installed,
0
# Sass will already be installed as a plugin or gem, respectively.
0
+# The first step for all of these is to install the Haml gem:
0
-# To install Haml and Sass as a Ruby on Rails plugin,
0
-# use the normal Rails plugin installer:
0
+# To enable it as a Rails plugin,
0
+# haml --rails path/to/rails/app
0
+# To enable Sass in Merb,
0
-#
./script/plugin install http://svn.hamptoncatlin.com/haml/tags/stable0
+#
to config/dependencies.rb.0
-# Sass templates in Rails
don't quite function in the same way as views,
0
+# Sass templates in Rails
and Merb don't quite function in the same way as views,
0
# because they don't contain dynamic content,
0
# and so only need to be compiled when the template file has been updated.
0
# By default (see options, below),
0
@@ -41,11 +51,8 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir)
0
# For instance, public/stylesheets/sass/main.sass would be compiled to public/stylesheets/main.css.
0
# Using Sass in Ruby code is very simple.
0
-# First install the Haml/Sass RubyGem:
0
-# Then you can use it by including the "sass" gem
0
+# After installing the Haml gem,
0
+# you can use it by running <tt>require "sass"</tt>
0
# and using Sass::Engine like so:
0
# engine = Sass::Engine.new("#main\n :background-color #0000ff")
0
@@ -394,7 +401,7 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir)
0
# but all constants in that file are made available in the current file.
0
# Sass looks for other Sass files in the working directory,
0
-# and the Sass file directory under Rails
.
0
+# and the Sass file directory under Rails
or Merb.
0
# Additional search directories may be specified
0
# using the :load_paths option (see below).
0
@@ -562,7 +569,7 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir)
0
# time a controller is accessed,
0
# as opposed to only when the template has been modified.
0
-# Only has meaning within Ruby on Rails
.
0
+# Only has meaning within Ruby on Rails
or Merb.
0
# [<tt>:always_check</tt>] Whether a Sass template should be checked for updates every
0
# time a controller is accessed,
0
@@ -573,24 +580,34 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir)
0
# Only has meaning within Ruby on Rails.
0
+# [<tt>:full_exception</tt>] Whether an error in the Sass code
0
+# should cause Sass to provide a detailed description.
0
+# If set to true, the specific error will be displayed
0
+# along with a line number and source snippet.
0
+# Otherwise, a simple uninformative error message will be displayed.
0
+# Defaults to false in production mode, true otherwise.
0
+# Only has meaning within Ruby on Rails or Merb.
0
# [<tt>:template_location</tt>] The directory where Sass templates should be read from.
0
-# Defaults to <tt>RAILS_ROOT + "/public/stylesheets/sass"</tt>.
0
-# Only has meaning within Ruby on Rails.
0
+# Defaults to <tt>RAILS_ROOT + "/public/stylesheets/sass"</tt>
0
+# or <tt>MERB_ROOT + "/public/stylesheets/sass"</tt>.
0
+# Only has meaning within Ruby on Rails or Merb.
0
# [<tt>:css_location</tt>] The directory where CSS output should be written to.
0
-# Defaults to <tt>RAILS_ROOT + "/public/stylesheets"</tt>.
0
-# Only has meaning within Ruby on Rails.
0
+# Defaults to <tt>RAILS_ROOT + "/public/stylesheets"</tt>
0
+# or <tt>MERB_ROOT + "/public/stylesheets"</tt>.
0
+# Only has meaning within Ruby on Rails or Merb.
0
# [<tt>:filename</tt>] The filename of the file being rendered.
0
# This is used solely for reporting errors,
0
-# and is automatically set when using Rails
.
0
+# and is automatically set when using Rails
or Merb.
0
# [<tt>:load_paths</tt>] An array of filesystem paths which should be searched
0
# for Sass templates imported with the "@import" directive.
0
-# This defaults to the working directory and, in Rails,
0
-# whatever <tt>:template_location</tt> is
0
-# (by default <tt>RAILS_ROOT + "/public/stylesheets/sass"</tt>).
0
+# This defaults to the working directory and, in Rails or Merb,
0
+# whatever <tt>:template_location</tt> is.
0
+require 'sass/plugin' if defined?(Merb::Plugins)