babel-transpiler-0.7.0/0000755000175100017510000000000012764522750013474 5ustar srudsrudbabel-transpiler-0.7.0/lib/0000755000175100017510000000000012764522750014242 5ustar srudsrudbabel-transpiler-0.7.0/lib/babel/0000755000175100017510000000000012764522750015307 5ustar srudsrudbabel-transpiler-0.7.0/lib/babel/transpiler/0000755000175100017510000000000012764522750017472 5ustar srudsrudbabel-transpiler-0.7.0/lib/babel/transpiler/version.rb0000644000175100017510000000010112764522750021474 0ustar srudsrudmodule Babel module Transpiler VERSION = "0.7.0" end end babel-transpiler-0.7.0/lib/babel/transpiler.rb0000644000175100017510000000111212764522750020012 0ustar srudsrudrequire 'execjs' require 'babel/source' require 'babel/transpiler/version' module Babel module Transpiler def self.version VERSION end def self.source_version Source::VERSION end def self.source_path Source::PATH end def self.script_path File.join(source_path, "babel.js") end def self.context @context ||= ExecJS.compile("var self = this; " + File.read(script_path)) end def self.transform(code, options = {}) context.call('babel.transform', code, options.merge('ast' => false)) end end end babel-transpiler-0.7.0/lib/babel-transpiler.rb0000644000175100017510000000003312764522750020011 0ustar srudsrudrequire 'babel/transpiler' babel-transpiler-0.7.0/babel-transpiler.gemspec0000644000175100017510000000304012764522750020264 0ustar srudsrud######################################################### # This file has been automatically generated by gem2tgz # ######################################################### # -*- encoding: utf-8 -*- # stub: babel-transpiler 0.7.0 ruby lib Gem::Specification.new do |s| s.name = "babel-transpiler" s.version = "0.7.0" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Joshua Peek"] s.date = "2015-04-03" s.description = " Ruby Babel is a bridge to the JS Babel transpiler.\n" s.email = "josh@joshpeek.com" s.files = ["LICENSE", "lib/babel-transpiler.rb", "lib/babel/transpiler.rb", "lib/babel/transpiler/version.rb"] s.homepage = "https://github.com/babel/ruby-babel-transpiler" s.licenses = ["MIT"] s.rubygems_version = "2.5.1" s.summary = "Ruby Babel JS Compiler" if s.respond_to? :specification_version then s.specification_version = 4 if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_runtime_dependency(%q, ["< 6", ">= 4.0"]) s.add_runtime_dependency(%q, ["~> 2.0"]) s.add_development_dependency(%q, ["~> 5.5"]) else s.add_dependency(%q, ["< 6", ">= 4.0"]) s.add_dependency(%q, ["~> 2.0"]) s.add_dependency(%q, ["~> 5.5"]) end else s.add_dependency(%q, ["< 6", ">= 4.0"]) s.add_dependency(%q, ["~> 2.0"]) s.add_dependency(%q, ["~> 5.5"]) end end babel-transpiler-0.7.0/LICENSE0000644000175100017510000000203712764522750014503 0ustar srudsrudCopyright (c) 2015 Joshua Peek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.