Sha256: 483789fc2df97620114dc8895cefc465b9a6586b088f2f4f993787756832f7a8

Contents?: true

Size: 330 Bytes

Versions: 2

Compression:

Stored size: 330 Bytes

Contents

require 'sass'

module Slinky
  module SassCompiler
    Server.register_compiler self,
      :inputs => ["sass", "scss"],
      :outputs => ["css"]

    def SassCompiler::compile file
      s = File.read(file)
      sass_engine = Sass::Engine.new(s, :load_paths => [File.dirname(file)])
      sass_engine.render
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slinky-0.2.1 lib/slinky/compilers/sass-compiler.rb
slinky-0.2.0 lib/slinky/compilers/sass-compiler.rb