Sha256: f6068b842d8a96f13ffd15d214db9268721ef05ad02310a8eff1cfc0e574e33b

Contents?: true

Size: 423 Bytes

Versions: 4

Compression:

Stored size: 423 Bytes

Contents

require 'faml/filter_compilers/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

4 entries across 4 versions & 1 rubygems

Version Path
faml-0.3.1 lib/faml/filter_compilers/coffee.rb
faml-0.3.0 lib/faml/filter_compilers/coffee.rb
faml-0.2.16 lib/faml/filter_compilers/coffee.rb
faml-0.2.15 lib/faml/filter_compilers/coffee.rb