Sha256: e733247c2e3c9623bad57cb28dc5547ba14ae528d98cbeaaeadbd24368a8f99e

Contents?: true

Size: 477 Bytes

Versions: 3

Compression:

Stored size: 477 Bytes

Contents

module Mill

  class Resource

    class Stylesheet < Resource

      FileTypes = %w{
        text/css
      }

      def load
        super
        unless @input_file.basename.to_s.end_with?('.min.css')
          begin
            @content = SassC::Engine.new(@input_file.read, syntax: :scss, style: :compressed).render
          rescue SassC::SyntaxError => e
            raise "#{input_file}: error parsing CSS: #{e}"
          end
        end
      end

    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mill-0.16 lib/mill/resources/stylesheet.rb
mill-0.11 lib/mill/resources/stylesheet.rb
mill-0.10 lib/mill/resources/stylesheet.rb