class Middleman::Renderers::Sass::SassPlusCSSFilenameTemplate
def evaluate(scope, locals, &block)
def evaluate(scope, locals, &block) @engine = ::Sass::Engine.new(data, sass_options_with_scope(scope.class)) begin super rescue Sass::SyntaxError => e Sass::SyntaxError.exception_to_css(e, :full_exception => true) end end
def sass_options_with_scope(scope)
def sass_options_with_scope(scope) return sass_options if basename.nil? location_of_sass_file = if scope.build? File.join(scope.root, scope.build_dir) else scope.views end parts = basename.split('.') parts.pop css_filename = File.join(location_of_sass_file, scope.css_dir, parts.join(".")) sass_options.merge(scope.settings.sass).merge(:css_filename => css_filename) end