Sha256: dc17ab67ef8d77f5197b99f4b962bbbba3ecc0fa1e7548b3011ae2bff4746290

Contents?: true

Size: 622 Bytes

Versions: 1

Compression:

Stored size: 622 Bytes

Contents

module Slinky
  module SassCompiler
    Compilers.register_compiler self,
                                :inputs => ["sass", "scss"],
                                :outputs => ["css"],
                                :dependencies => [["sass", ">= 3.1.1"]],
                                :requires => ["sass"]

    def SassCompiler::compile s, file
      syntax = file.end_with?(".sass") ? :sass : :scss
      sass_engine = Sass::Engine.new(s,
                                     :syntax => syntax,
                                     :load_paths => [File.dirname(file)])
      sass_engine.render
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slinky-0.8.0 lib/slinky/compilers/sass-compiler.rb