Sha256: 4d34687ddfb1d4cde8686e7fcf8b0c9771259e290b2b63cbbe3d8fb52e5e4d37

Contents?: true

Size: 361 Bytes

Versions: 13

Compression:

Stored size: 361 Bytes

Contents

# -*- encoding : utf-8 -*-

require "coffee-script"

include_set Abstract::Script

format :html do
  def ace_mode
    :coffee
  end
end

format do
  view :core do
    compile_coffee _render_raw
  end

  def compile_coffee script
    ::CoffeeScript.compile script
  rescue => e
    raise Card::Error, "CoffeeScript::Error (#{card.name}): #{e.message}"
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
card-1.93.7 mod/machines/set/type/coffee_script.rb
card-1.93.6 mod/machines/set/type/coffee_script.rb
card-1.93.5 mod/machines/set/type/coffee_script.rb
card-1.93.4 mod/machines/set/type/coffee_script.rb
card-1.93.3 mod/machines/set/type/coffee_script.rb
card-1.93.2 mod/machines/set/type/coffee_script.rb
card-1.93.1 mod/machines/set/type/coffee_script.rb
card-1.93.0 mod/machines/set/type/coffee_script.rb
card-1.92.2 mod/machines/set/type/coffee_script.rb
card-1.92.1 mod/machines/set/type/coffee_script.rb
card-1.92 mod/machines/set/type/coffee_script.rb
card-1.91 mod/machines/set/type/coffee_script.rb
card-1.21.0 mod/machines/set/type/coffee_script.rb