Sha256: 97528a39537e79315ae2898d8e4ccb868b0a0bbbc1630eb0f074519dba971429
Contents?: true
Size: 535 Bytes
Versions: 14
Compression:
Stored size: 535 Bytes
Contents
# encoding: utf-8 require "sass" require "ace/filters" module Ace class SassFilter < Filter def call(item, content) if item.output_path && item.output_path.end_with?(".scss") item.output_path.sub!(/scss$/, "css") begin engine = Sass::Engine.new(content, {:syntax => :scss}) output = engine.render rescue Exception => e warn "~~ SassFilter exception: #{e}" abort end return output else return content end end end end
Version data entries
14 entries across 14 versions & 1 rubygems