Sha256: e1770d7a79e45e86dc8ea7b790bc6ddc424e0c9371b2f7677559ac271c7db65b

Contents?: true

Size: 410 Bytes

Versions: 11

Compression:

Stored size: 410 Bytes

Contents

require_relative 'tilt_base'

module Faml
  module FilterCompilers
    class Coffee < TiltBase
      def compile(ast)
        temple = [:multi, [:static, "\n"], [:newline]]
        compile_with_tilt(temple, 'coffee', ast, indent_width: 2)
        temple << [:static, "\n"]
        [:haml, :tag, 'script', false, [:html, :attrs], [:html, :js, temple]]
      end
    end

    register(:coffee, Coffee)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
faml-0.6.0 lib/faml/filter_compilers/coffee.rb
faml-0.5.1 lib/faml/filter_compilers/coffee.rb
faml-0.5.0 lib/faml/filter_compilers/coffee.rb
faml-0.4.2 lib/faml/filter_compilers/coffee.rb
faml-0.4.1 lib/faml/filter_compilers/coffee.rb
faml-0.4.0 lib/faml/filter_compilers/coffee.rb
faml-0.3.6 lib/faml/filter_compilers/coffee.rb
faml-0.3.5 lib/faml/filter_compilers/coffee.rb
faml-0.3.4 lib/faml/filter_compilers/coffee.rb
faml-0.3.3 lib/faml/filter_compilers/coffee.rb
faml-0.3.2 lib/faml/filter_compilers/coffee.rb