module Babel::Transpiler
def self.context
def self.context @context ||= ExecJS.compile("var self = this; " + File.read(script_path)) end
def self.script_path
def self.script_path File.join(source_path, "babel.js") end
def self.source_path
def self.source_path Source::PATH end
def self.source_version
def self.source_version Source::VERSION end
def self.transform(code, options = {})
def self.transform(code, options = {}) context.call('babel.transform', code, options.merge('ast' => false)) end
def self.version
def self.version VERSION end