From 770f8710710bb0efa7356848bf38785b7c8dbd87 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 2 Jan 2010 10:47:34 -0800 Subject: [PATCH] Support for SCSS files if haml edge is installed. --- lib/compass/compiler.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/compass/compiler.rb b/lib/compass/compiler.rb index 041091c8..7f517d32 100644 --- a/lib/compass/compiler.rb +++ b/lib/compass/compiler.rb @@ -19,7 +19,7 @@ module Compass def sass_files(options = {}) exclude_partials = options.fetch(:exclude_partials, true) - @sass_files = self.options[:sass_files] || Dir.glob(separate("#{from}/**/#{'[^_]' if exclude_partials}*.sass")) + @sass_files = self.options[:sass_files] || Dir.glob(separate("#{from}/**/#{'[^_]' if exclude_partials}*.s[ac]ss")) end def stylesheet_name(sass_file) @@ -104,7 +104,8 @@ module Compass # A sass engine for compiling a single file. def engine(sass_filename, css_filename) - opts = options.merge :filename => sass_filename, :css_filename => css_filename + syntax = (sass_filename =~ /\.(s[ac]ss)$/) && $1.to_sym || :sass + opts = options.merge :filename => sass_filename, :css_filename => css_filename, :syntax => syntax Sass::Engine.new(open(sass_filename).read, opts) end