Sha256: 9e51b343de4eb04d499d3064b191d75ff9efe5838d9b71d14545fcc1c813a019

Contents?: true

Size: 275 Bytes

Versions: 3

Compression:

Stored size: 275 Bytes

Contents

require 'tilt/template'
require 'babel/transpiler'

module Tilt
  class BabelTemplate < Template
    def prepare
      options[:filename] ||= file
    end

    def evaluate(scope, locals, &block)
      @output ||= Babel::Transpiler.transform(data)["code"]
    end
  end
end

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
brakeman-3.3.0 bundle/ruby/2.3.0/gems/tilt-2.0.2/lib/tilt/babel.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/tilt-2.0.2/lib/tilt/babel.rb
tilt-2.0.2 lib/tilt/babel.rb