Sha256: 7ddd8e4e98b559b9a1da9e5e7568b79b206f4b59bfd19d3592ceb88ea82bed42

Contents?: true

Size: 879 Bytes

Versions: 3

Compression:

Stored size: 879 Bytes

Contents

# -*- encoding : utf-8 -*-
require 'sass'
include Machine
include MachineInput

store_machine_output :filetype => "css"

machine_input do 
  compress_css format(:format => :css)._render_core
end

def compress_css input
  begin
    Sass.compile input, :style=>:compressed
  rescue => e
    raise Card::Oops, "Stylesheet Error:\n#{ e.message }"
  end
end 

def clean_html?
  false
end

def chunk_list  #turn off autodetection of uri's 
  :inclusion_and_link
end


format :html do
  view :editor, :mod=>PlainText::HtmlFormat
  
  view :core do |args|
    # FIXME: scan must happen before process for inclusion interactions to work, but this will likely cause
    # problems with including other css?
    process_content ::CodeRay.scan( _render_raw, :css ).div, :size=>:icon
  end
  
  view :content_changes, :mod=>CoffeeScript::HtmlFormat
end

def diff_args
   {:format=>:text}
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wagn-1.14.7 mod/03_machines/set/type/css.rb
wagn-1.14.6 mod/03_machines/set/type/css.rb
wagn-1.14.5 mod/03_machines/set/type/css.rb