Sha256: ca30694c1ee71688f02363e9700bc0b9e34f637d7ea1bce354e3d9094b815a28

Contents?: true

Size: 529 Bytes

Versions: 5

Compression:

Stored size: 529 Bytes

Contents

require 'sass'
require 'sass/plugin'

Sass::Plugin.options[:cache_location] = File.join(Spider.paths[:tmp], 'sass-cache')

module Spider
    
    module SassCompiler
        
        def self.compile(src, dest)
            engine = Sass::Engine.for_file(src, {})
            output = engine.render
            File.open(dest, 'w') do |f|
                f.write "/* This file is autogenerated; do not edit directly (edit #{src} instead) */\n\n"
                f.write output
            end
        end
        
    end
    
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spiderfw-0.6.21 lib/spiderfw/templates/resources/sass.rb
spiderfw-0.6.20 lib/spiderfw/templates/resources/sass.rb
spiderfw-0.6.19 lib/spiderfw/templates/resources/sass.rb
spiderfw-0.6.18 lib/spiderfw/templates/resources/sass.rb
spiderfw-0.6.17 lib/spiderfw/templates/resources/sass.rb