Sha256: a143f8f5928fa5d76c90a8b81245ee2bd39bc07226dc0a2c2d9389b127009153

Contents?: true

Size: 740 Bytes

Versions: 5

Compression:

Stored size: 740 Bytes

Contents

if Object.const_defined?(:Sass)
  module Erector
    # Adds sass support to Erector widgets. 
    # Note that sass is provided inside the gem named "haml", 
    # not the gem named "sass".
    # To get sass support into your Erector project, install the 
    # haml gem -- see http://sass-lang.com/download.html -- and
    # then do something like this:
    #     require 'rubygems'
    #     require 'sass'
    #
    # Current support is barebones. Please offer suggestions (or better
    # yet, patches) for whether and how to support, e.g., caching, 
    # loading from files, precompilation, etc.
    module Sass
      def sass(sass_text)
        style ::Sass::Engine.new(sass_text, :cache => false).render
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
erector-0.8.3 lib/erector/sass.rb
erector-0.8.2 lib/erector/sass.rb
honkster-erector-0.8.1 lib/erector/sass.rb
erector-0.8.1 lib/erector/sass.rb
erector-0.8.0 lib/erector/sass.rb