Sha256: 21bacf8e462be2f29113bf7359c5eedc60a43dd00475b2b37f1d77bd8c288982

Contents?: true

Size: 427 Bytes

Versions: 12

Compression:

Stored size: 427 Bytes

Contents

require 'faml/filter_compilers/base'

module Faml
  module FilterCompilers
    class Javascript < Base
      def compile(ast)
        temple = [:multi, [:static, "\n"], [:newline]]
        compile_texts(temple, ast.lineno, ast.texts, tab_width: 2)
        temple << [:static, "\n"]
        [:haml, :tag, 'script', false, [:html, :attrs], [:html, :js, temple]]
      end
    end

    register(:javascript, Javascript)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
faml-0.3.1 lib/faml/filter_compilers/javascript.rb
faml-0.3.0 lib/faml/filter_compilers/javascript.rb
faml-0.2.16 lib/faml/filter_compilers/javascript.rb
faml-0.2.15 lib/faml/filter_compilers/javascript.rb
faml-0.2.14 lib/faml/filter_compilers/javascript.rb
faml-0.2.13 lib/faml/filter_compilers/javascript.rb
faml-0.2.12 lib/faml/filter_compilers/javascript.rb
faml-0.2.11 lib/faml/filter_compilers/javascript.rb
faml-0.2.10 lib/faml/filter_compilers/javascript.rb
faml-0.2.9 lib/faml/filter_compilers/javascript.rb
faml-0.2.8 lib/faml/filter_compilers/javascript.rb
faml-0.2.7 lib/faml/filter_compilers/javascript.rb