Repository: babel/ruby-babel-transpiler
Branch: master
Commit: 6878f6edb4e7
Files: 175
Total size: 14.3 KB
Directory structure:
gitextract_fr5fwut_/
├── .gitignore
├── .travis.yml
├── Gemfile
├── LICENSE
├── MAINTAINING.md
├── README.md
├── SOURCE-BUILDS.md
├── babel-source.gemspec.erb
├── babel-transpiler.gemspec
├── lib/
│ ├── babel/
│ │ ├── source.rb.erb
│ │ ├── transpiler/
│ │ │ └── version.rb
│ │ └── transpiler.rb
│ └── babel-transpiler.rb
├── script/
│ ├── build-gem
│ ├── deploy
│ ├── eval-erb-template
│ ├── gem-version
│ ├── local-source-versions
│ ├── published-source-versions
│ ├── test
│ ├── test-gem
│ ├── unpublished-source-versions
│ └── validate-travis
├── source-versions/
│ ├── 4.0.1
│ ├── 4.0.2
│ ├── 4.1.1
│ ├── 4.2.0
│ ├── 4.2.1
│ ├── 4.3.0
│ ├── 4.4.1
│ ├── 4.4.2
│ ├── 4.4.3
│ ├── 4.4.4
│ ├── 4.4.5
│ ├── 4.4.6
│ ├── 4.5.0
│ ├── 4.5.2
│ ├── 4.5.3
│ ├── 4.5.4
│ ├── 4.5.5
│ ├── 4.6.0
│ ├── 4.6.1
│ ├── 4.6.2
│ ├── 4.6.3
│ ├── 4.6.4
│ ├── 4.6.5
│ ├── 4.6.6
│ ├── 4.7.0
│ ├── 4.7.1
│ ├── 4.7.10
│ ├── 4.7.11
│ ├── 4.7.12
│ ├── 4.7.13
│ ├── 4.7.14
│ ├── 4.7.15
│ ├── 4.7.16
│ ├── 4.7.2
│ ├── 4.7.3
│ ├── 4.7.4
│ ├── 4.7.5
│ ├── 4.7.6
│ ├── 4.7.7
│ ├── 4.7.8
│ ├── 4.7.9
│ ├── 5.0.0
│ ├── 5.0.0-beta1
│ ├── 5.0.0-beta2
│ ├── 5.0.0-beta3
│ ├── 5.0.0-beta4
│ ├── 5.0.1
│ ├── 5.0.10
│ ├── 5.0.11
│ ├── 5.0.12
│ ├── 5.0.13
│ ├── 5.0.2
│ ├── 5.0.3
│ ├── 5.0.4
│ ├── 5.0.5
│ ├── 5.0.6
│ ├── 5.0.7
│ ├── 5.0.8
│ ├── 5.0.9
│ ├── 5.1.0
│ ├── 5.1.1
│ ├── 5.1.10
│ ├── 5.1.11
│ ├── 5.1.12
│ ├── 5.1.13
│ ├── 5.1.2
│ ├── 5.1.3
│ ├── 5.1.4
│ ├── 5.1.5
│ ├── 5.1.6
│ ├── 5.1.7
│ ├── 5.1.8
│ ├── 5.1.9
│ ├── 5.2.0
│ ├── 5.2.1
│ ├── 5.2.10
│ ├── 5.2.11
│ ├── 5.2.12
│ ├── 5.2.13
│ ├── 5.2.14
│ ├── 5.2.15
│ ├── 5.2.16
│ ├── 5.2.17
│ ├── 5.2.2
│ ├── 5.2.6
│ ├── 5.2.7
│ ├── 5.2.8
│ ├── 5.2.9
│ ├── 5.3.0
│ ├── 5.3.1
│ ├── 5.3.2
│ ├── 5.3.3
│ ├── 5.4.0
│ ├── 5.4.1
│ ├── 5.4.2
│ ├── 5.4.3
│ ├── 5.4.4
│ ├── 5.4.5
│ ├── 5.4.6
│ ├── 5.4.7
│ ├── 5.6.0
│ ├── 5.6.1
│ ├── 5.6.11
│ ├── 5.6.12
│ ├── 5.6.13
│ ├── 5.6.14
│ ├── 5.6.15
│ ├── 5.6.16
│ ├── 5.6.17
│ ├── 5.6.18
│ ├── 5.6.19
│ ├── 5.6.2
│ ├── 5.6.20
│ ├── 5.6.3
│ ├── 5.6.4
│ ├── 5.6.5
│ ├── 5.6.6
│ ├── 5.6.7
│ ├── 5.8.0
│ ├── 5.8.1
│ ├── 5.8.10
│ ├── 5.8.11
│ ├── 5.8.12
│ ├── 5.8.13
│ ├── 5.8.14
│ ├── 5.8.15
│ ├── 5.8.16
│ ├── 5.8.17
│ ├── 5.8.18
│ ├── 5.8.19
│ ├── 5.8.2
│ ├── 5.8.23
│ ├── 5.8.24
│ ├── 5.8.25
│ ├── 5.8.26
│ ├── 5.8.27
│ ├── 5.8.28
│ ├── 5.8.29
│ ├── 5.8.3
│ ├── 5.8.30
│ ├── 5.8.31
│ ├── 5.8.32
│ ├── 5.8.33
│ ├── 5.8.34
│ ├── 5.8.35
│ ├── 5.8.4
│ ├── 5.8.5
│ ├── 5.8.6
│ ├── 5.8.7
│ ├── 5.8.8
│ └── 5.8.9
└── test/
└── test_babel_transpiler.rb
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*.gem
Gemfile.lock
tmp/
================================================
FILE: .travis.yml
================================================
language: ruby
cache: bundler
sudo: false
script: ./script/test
after_success: ./script/deploy
env:
global:
secure: "QQRK8r/bp7FY8gDAPKywoiUkUSmW5gjrV4d1CM8IguncenjAy0HKGrOy0bWMLj0iz211AuxVvofk6c7B3410ILIjbGgMlPNFe8AGlZhL5lTIIc3D4SxEJ5t/cGQ/BCOyN+IG5qvgYBjwcRQm56NNOhwIHWYS6noAQOWfjafxL3I="
matrix:
- BUILD_SOURCE_GEM=1
- VALIDATE_TRAVIS=1
- SOURCE_VERSION="~>4.0.0"
- SOURCE_VERSION="~>4.1.0"
- SOURCE_VERSION="~>4.2.0"
- SOURCE_VERSION="~>4.3.0"
- SOURCE_VERSION="~>4.4.0"
- SOURCE_VERSION="~>4.5.0"
- SOURCE_VERSION="~>4.6.0"
- SOURCE_VERSION="~>4.7.0"
- SOURCE_VERSION="~>5.0.0"
- SOURCE_VERSION="~>5.1.0"
- SOURCE_VERSION="~>5.2.0"
- SOURCE_VERSION="~>5.3.0"
- SOURCE_VERSION="~>5.4.0"
- SOURCE_VERSION="~>5.6.0"
- SOURCE_VERSION="~>5.8.0"
matrix:
include:
- rvm: 2.0.0
env:
- rvm: 2.1
env:
- rvm: 2.2
env:
- rvm: 2.3.0
env:
allow_failures:
- env: VALIDATE_TRAVIS=1
================================================
FILE: Gemfile
================================================
source 'https://rubygems.org'
gemspec path: ENV['PWD']
gem 'babel-source', ENV['SOURCE_VERSION']
================================================
FILE: LICENSE
================================================
Copyright (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.
================================================
FILE: MAINTAINING.md
================================================
# Maintaining
## Releasing a new version
This project follows [semver](http://semver.org/). Any gem dependency changes
will require a new major release.
### Make a release commit
To prepare the release commit, edit the
[lib/babel/transpiler/version.rb](https://github.com/babel/ruby-babel-transpiler/blob/master/lib/babel/transpiler/version.rb)
constant. Then make a single commit with the description as
"Ruby Babel Transpiler 1.x.x". Tag the commit with `v1.x.x`. Finally, build the gem and
push it to RubyGems.
``` sh
$ git pull
$ vim lib/babel/transpiler/version.rb
$ git add lib/babel/transpiler/version.rb
$ git commit -m "Ruby Babel Transpiler 1.x.x"
$ git tag v1.x.x
$ git push
$ git push --tags
$ gem build babel-transpiler.gemspec
$ gem push babel-transpiler*.gem
```
================================================
FILE: README.md
================================================
# Ruby Babel Transpiler
Ruby Babel is a bridge to the [JS Babel transpiler](https://babeljs.io).
``` ruby
require 'babel/transpiler'
Babel::Transpiler.transform File.read("foo.es6")
```
## Installation
``` sh
$ gem install babel-transpiler
```
## Dependencies
This library depends on the `babel-source` gem which is updated any time a new version of [Babel](https://babeljs.io) is released.
### ExecJS
The [ExecJS](https://github.com/rails/execjs) library is used to automatically choose the best JavaScript engine for your platform. Check out its [README](https://github.com/rails/execjs/blob/master/README.md) for a complete list of supported engines.
================================================
FILE: SOURCE-BUILDS.md
================================================
# Babel Source Builds
The Ruby transpiler bridge is just a thin [ExecJS](https://github.com/rails/execjs) wrapper around the [Babel](https://babeljs.io) JS source. The source itself is redistributed as a [babel-source](https://rubygems.org/gems/babel-source) RubyGem with the corresponding version. This means users can easily upgrade to the latest Babel anytime its released while maintaining Ruby API compatibility.
Babel JS releases tend be released more frequently than changes to the Ruby bridge itself. So theres some automation behind releasing the source gems.
## CI gem builds
`BUILD_SOURCE_GEM=1` is a special entry in the Travis build matrix that automatically builds and tests unpublished source gems.
A list of *local source versions* is maintained under the `source-versions/` directory. This listing is diff'd against the [published release list on rubygems.org](https://rubygems.org/gems/babel-source/versions) to get the subset of unpublished gems that should be tested.
To test a new release, `touch source-versions/1.2.3`, commit the file and push the changes.
On the Travis build matrix, see the `BUILD_SOURCE_GEM=1` job.
[](https://travis-ci.org/babel/ruby-babel-transpiler/builds/52399555)
This job runs the [`build-gem`](https://github.com/babel/ruby-babel-transpiler/blob/master/script/build-gem) script which fetches the [babel/babel](https://github.com/babel/babel) for the version and builds a local `.gem` file. The [`test-gem`](https://github.com/babel/ruby-babel-transpiler/blob/master/script/test-gem) then runs the test suite against the gem. This catches any changes in the babel build process or API changes that may need to be made to the Ruby bridge before releasing.
[](https://travis-ci.org/babel/ruby-babel-transpiler/jobs/52399556)
### CI gem releases
While any fork can test changes against the source gem building code path, `master` has a special deployment designation.
Any unreleased source gem pushed to `master` will be automatically published to RubyGems via a Travis `after_success` [`deploy`](https://github.com/babel/ruby-babel-transpiler/blob/master/script/deploy) script. Unfortunately, none of the [official Travis deployment providers](http://docs.travis-ci.com/user/deployment/) could be used. But that may change in the future.
So core contributors may release a new source version by touching `source-versions/1.2.3` and committing to `master`. No need to worry about special RubyGem permissions.
### PR release requests
To complete the automation workflow, "release requests" are automatically published anytime a new tag is pushed to [babel/babel](https://github.com/babel/babel/releases). Contributors just should verify the build is green and should merge any new release.
[](https://github.com/babel/ruby-babel-transpiler/pull/111/files)
A [babel/babel](https://github.com/babel/babel/releases) Webhook is setup to POST to a Heroku instance running the [pr-release](https://github.com/babel/ruby-babel-transpiler/blob/heroku/pr-release) script. Its only responsible for opening a PR with a new `source-versions/1.x.x` file. To avoid merge conflicts, the local versions are tracked as individual files rather than a single file with a list of versions.
Should the Webhook fail or a PR need to be reopened for an older version, this can all be done manually with any GitHub user or fork. Theres nothing special about the bot account or its permissions.
================================================
FILE: babel-source.gemspec.erb
================================================
Gem::Specification.new do |s|
s.name = 'babel-source'
s.version = "<%= version %>"
s.date = Time.at(<%= date %>)
s.summary = "Babel JS source"
s.homepage = "https://github.com/babel/ruby-babel-transpiler"
s.license = "MIT"
s.files = [
'LICENSE',
'lib/babel.js',
'lib/babel/external-helpers.js',
'lib/babel/polyfill.js',
'lib/babel/source.rb'
]
s.authors = ['Sebastian McKenzie']
s.email = 'sebmck@gmail.com'
end
================================================
FILE: babel-transpiler.gemspec
================================================
require File.expand_path("../lib/babel/transpiler/version.rb", __FILE__)
Gem::Specification.new do |s|
s.name = 'babel-transpiler'
s.version = Babel::Transpiler::VERSION
s.homepage = "https://github.com/babel/ruby-babel-transpiler"
s.summary = "Ruby Babel JS Compiler"
s.description = <<-EOS
Ruby Babel is a bridge to the JS Babel transpiler.
EOS
s.license = "MIT"
s.files = [
'lib/babel-transpiler.rb',
'lib/babel/transpiler.rb',
'lib/babel/transpiler/version.rb',
'LICENSE'
]
s.add_dependency 'babel-source', '>= 4.0', '< 6'
s.add_dependency 'execjs', '~> 2.0'
s.add_development_dependency 'minitest', '~> 5.5'
s.authors = ['Joshua Peek']
s.email = 'josh@joshpeek.com'
end
================================================
FILE: lib/babel/source.rb.erb
================================================
module Babel
module Source
VERSION = "<%= version %>"
DATE = Time.at(<%= date %>)
PATH = File.expand_path("../..", __FILE__)
end
end
================================================
FILE: lib/babel/transpiler/version.rb
================================================
module Babel
module Transpiler
VERSION = "0.7.0"
end
end
================================================
FILE: lib/babel/transpiler.rb
================================================
require '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
================================================
FILE: lib/babel-transpiler.rb
================================================
require 'babel/transpiler'
================================================
FILE: script/build-gem
================================================
#!/bin/bash
set -e
set -x
VERSION="$1"
GEM_VERSION=$(./script/gem-version $VERSION)
mkdir -p tmp/
pushd tmp/
if [ ! -d babel ]; then
git clone https://github.com/babel/babel
fi
pushd babel/
git fetch origin
git checkout --quiet "v$VERSION"
make bootstrap build-dist
DATE=$(git show --format=%at | head -n1)
popd
popd
dir="tmp/babel-source-$VERSION"
mkdir -p "$dir/lib/babel"
cp "tmp/babel/packages/babel/dist/browser.js" "$dir/lib/babel.js"
cp "tmp/babel/packages/babel/dist/external-helpers.js" "$dir/lib/babel/external-helpers.js"
cp "tmp/babel/packages/babel/dist/polyfill.js" "$dir/lib/babel/polyfill.js"
cp "tmp/babel/LICENSE" "$dir/LICENSE"
./script/eval-erb-template "babel-source.gemspec.erb" "$GEM_VERSION" "$DATE" > "$dir/babel-source.gemspec"
./script/eval-erb-template "lib/babel/source.rb.erb" "$GEM_VERSION" "$DATE" > "$dir/lib/babel/source.rb"
pushd "$dir"
gem build babel-source.gemspec
popd
mkdir -p tmp/vendor/cache
cp "$dir/babel-source-$GEM_VERSION.gem" "tmp/vendor/cache"
================================================
FILE: script/deploy
================================================
#!/bin/bash
set -e
if [ -n "$TRAVIS" ] && ([ "$TRAVIS_SECURE_ENV_VARS" != "true" ] || [ "$TRAVIS_BRANCH" != "master" ] || [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ -z "$BUILD_SOURCE_GEM" ])
then
echo "skipping deploy" >&2
exit 0
fi
echo "deploying unpublished versions" >&2
if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then
cat << EOF > ~/.gem/credentials
---
:rubygems_api_key: $RUBYGEMS_API_KEY
EOF
chmod 0600 ~/.gem/credentials
fi
for source_version in $(./script/unpublished-source-versions)
do
if [ ! -f "tmp/vendor/cache/babel-source-$source_version.gem" ]; then
./script/test-gem "$version"
fi
gem push "tmp/vendor/cache/babel-source-$source_version.gem"
done
================================================
FILE: script/eval-erb-template
================================================
#!/usr/bin/env ruby
require 'erb'
version, date = ARGV[1], ARGV[2]
puts ERB.new(File.read(ARGV[0])).result(binding)
================================================
FILE: script/gem-version
================================================
#!/bin/bash
if [ -n "$1" ]; then
echo $1 | sed s/-/./g
else
sed s/-/./g
fi
================================================
FILE: script/local-source-versions
================================================
#!/bin/bash
ls ./source-versions | sort
================================================
FILE: script/published-source-versions
================================================
#!/usr/bin/env ruby
require 'json'
require 'open-uri'
url = "https://rubygems.org/api/v1/versions/babel-source.json"
puts JSON.parse(open(url).read).map { |v| v["number"] }.reverse
================================================
FILE: script/test
================================================
#!/bin/bash
set -e
bundle exec ruby -w test/test_babel_transpiler.rb
if [ -n "$VALIDATE_TRAVIS" ]; then
./script/validate-travis
fi
if [ -n "$BUILD_SOURCE_GEM" ]; then
for version in $(./script/unpublished-source-versions)
do
./script/test-gem "$version"
done
fi
================================================
FILE: script/test-gem
================================================
#!/bin/bash
set -e
set -x
export VERSION="$1"
export SOURCE_VERSION=$(./script/gem-version $VERSION)
if [ ! -f "tmp/vendor/cache/babel-source-$SOURCE_VERSION.gem" ]; then
./script/build-gem "$VERSION"
fi
cp Gemfile tmp/Gemfile
rm -f tmp/Gemfile.lock
export BUNDLE_GEMFILE="tmp/Gemfile"
bundle install --no-prune
bundle exec ruby test/test_babel_transpiler.rb
================================================
FILE: script/unpublished-source-versions
================================================
#!/bin/bash
comm -13 <(./script/published-source-versions | sort) <(./script/local-source-versions | ./script/gem-version | sort)
================================================
FILE: script/validate-travis
================================================
#!/usr/bin/env ruby
require 'set'
require 'yaml'
def version_constraints(versions)
Set.new(versions.compact.map { |v|
v =~ /^(\d+)\.(\d+)\.(\d+)$/ && v.sub(/^(\d+)\.(\d+)\.(\d+)$/, '~>\1.\2.0')
}.compact)
end
published = version_constraints(`./script/published-source-versions`.split("\n"))
local = version_constraints(`./script/local-source-versions`.split("\n"))
config = YAML.load(File.read(".travis.yml"))
travis = Set.new(config["env"]["matrix"].map { |s| s[/^SOURCE_VERSION="(.+)"$/, 1] }.compact)
missing = (published & local) - travis
if missing.any?
abort "Add the following envs to .travis.yml: \n" +
missing.map { |v| "- SOURCE_VERSION=\"#{v}\"" }.join("\n")
end
================================================
FILE: source-versions/4.0.1
================================================
================================================
FILE: source-versions/4.0.2
================================================
================================================
FILE: source-versions/4.1.1
================================================
================================================
FILE: source-versions/4.2.0
================================================
================================================
FILE: source-versions/4.2.1
================================================
================================================
FILE: source-versions/4.3.0
================================================
================================================
FILE: source-versions/4.4.1
================================================
================================================
FILE: source-versions/4.4.2
================================================
================================================
FILE: source-versions/4.4.3
================================================
================================================
FILE: source-versions/4.4.4
================================================
================================================
FILE: source-versions/4.4.5
================================================
================================================
FILE: source-versions/4.4.6
================================================
================================================
FILE: source-versions/4.5.0
================================================
================================================
FILE: source-versions/4.5.2
================================================
================================================
FILE: source-versions/4.5.3
================================================
================================================
FILE: source-versions/4.5.4
================================================
================================================
FILE: source-versions/4.5.5
================================================
================================================
FILE: source-versions/4.6.0
================================================
================================================
FILE: source-versions/4.6.1
================================================
================================================
FILE: source-versions/4.6.2
================================================
================================================
FILE: source-versions/4.6.3
================================================
================================================
FILE: source-versions/4.6.4
================================================
================================================
FILE: source-versions/4.6.5
================================================
================================================
FILE: source-versions/4.6.6
================================================
================================================
FILE: source-versions/4.7.0
================================================
================================================
FILE: source-versions/4.7.1
================================================
================================================
FILE: source-versions/4.7.10
================================================
================================================
FILE: source-versions/4.7.11
================================================
================================================
FILE: source-versions/4.7.12
================================================
================================================
FILE: source-versions/4.7.13
================================================
================================================
FILE: source-versions/4.7.14
================================================
================================================
FILE: source-versions/4.7.15
================================================
================================================
FILE: source-versions/4.7.16
================================================
================================================
FILE: source-versions/4.7.2
================================================
================================================
FILE: source-versions/4.7.3
================================================
================================================
FILE: source-versions/4.7.4
================================================
================================================
FILE: source-versions/4.7.5
================================================
================================================
FILE: source-versions/4.7.6
================================================
================================================
FILE: source-versions/4.7.7
================================================
================================================
FILE: source-versions/4.7.8
================================================
================================================
FILE: source-versions/4.7.9
================================================
================================================
FILE: source-versions/5.0.0
================================================
================================================
FILE: source-versions/5.0.0-beta1
================================================
================================================
FILE: source-versions/5.0.0-beta2
================================================
================================================
FILE: source-versions/5.0.0-beta3
================================================
================================================
FILE: source-versions/5.0.0-beta4
================================================
================================================
FILE: source-versions/5.0.1
================================================
================================================
FILE: source-versions/5.0.10
================================================
================================================
FILE: source-versions/5.0.11
================================================
================================================
FILE: source-versions/5.0.12
================================================
================================================
FILE: source-versions/5.0.13
================================================
================================================
FILE: source-versions/5.0.2
================================================
================================================
FILE: source-versions/5.0.3
================================================
================================================
FILE: source-versions/5.0.4
================================================
================================================
FILE: source-versions/5.0.5
================================================
================================================
FILE: source-versions/5.0.6
================================================
================================================
FILE: source-versions/5.0.7
================================================
================================================
FILE: source-versions/5.0.8
================================================
================================================
FILE: source-versions/5.0.9
================================================
================================================
FILE: source-versions/5.1.0
================================================
================================================
FILE: source-versions/5.1.1
================================================
================================================
FILE: source-versions/5.1.10
================================================
================================================
FILE: source-versions/5.1.11
================================================
================================================
FILE: source-versions/5.1.12
================================================
================================================
FILE: source-versions/5.1.13
================================================
================================================
FILE: source-versions/5.1.2
================================================
================================================
FILE: source-versions/5.1.3
================================================
================================================
FILE: source-versions/5.1.4
================================================
================================================
FILE: source-versions/5.1.5
================================================
================================================
FILE: source-versions/5.1.6
================================================
================================================
FILE: source-versions/5.1.7
================================================
================================================
FILE: source-versions/5.1.8
================================================
================================================
FILE: source-versions/5.1.9
================================================
================================================
FILE: source-versions/5.2.0
================================================
================================================
FILE: source-versions/5.2.1
================================================
================================================
FILE: source-versions/5.2.10
================================================
================================================
FILE: source-versions/5.2.11
================================================
================================================
FILE: source-versions/5.2.12
================================================
================================================
FILE: source-versions/5.2.13
================================================
================================================
FILE: source-versions/5.2.14
================================================
================================================
FILE: source-versions/5.2.15
================================================
================================================
FILE: source-versions/5.2.16
================================================
================================================
FILE: source-versions/5.2.17
================================================
================================================
FILE: source-versions/5.2.2
================================================
================================================
FILE: source-versions/5.2.6
================================================
================================================
FILE: source-versions/5.2.7
================================================
================================================
FILE: source-versions/5.2.8
================================================
================================================
FILE: source-versions/5.2.9
================================================
================================================
FILE: source-versions/5.3.0
================================================
================================================
FILE: source-versions/5.3.1
================================================
================================================
FILE: source-versions/5.3.2
================================================
================================================
FILE: source-versions/5.3.3
================================================
================================================
FILE: source-versions/5.4.0
================================================
================================================
FILE: source-versions/5.4.1
================================================
================================================
FILE: source-versions/5.4.2
================================================
================================================
FILE: source-versions/5.4.3
================================================
================================================
FILE: source-versions/5.4.4
================================================
================================================
FILE: source-versions/5.4.5
================================================
================================================
FILE: source-versions/5.4.6
================================================
================================================
FILE: source-versions/5.4.7
================================================
================================================
FILE: source-versions/5.6.0
================================================
================================================
FILE: source-versions/5.6.1
================================================
================================================
FILE: source-versions/5.6.11
================================================
================================================
FILE: source-versions/5.6.12
================================================
================================================
FILE: source-versions/5.6.13
================================================
================================================
FILE: source-versions/5.6.14
================================================
================================================
FILE: source-versions/5.6.15
================================================
================================================
FILE: source-versions/5.6.16
================================================
================================================
FILE: source-versions/5.6.17
================================================
================================================
FILE: source-versions/5.6.18
================================================
================================================
FILE: source-versions/5.6.19
================================================
================================================
FILE: source-versions/5.6.2
================================================
================================================
FILE: source-versions/5.6.20
================================================
================================================
FILE: source-versions/5.6.3
================================================
================================================
FILE: source-versions/5.6.4
================================================
================================================
FILE: source-versions/5.6.5
================================================
================================================
FILE: source-versions/5.6.6
================================================
================================================
FILE: source-versions/5.6.7
================================================
================================================
FILE: source-versions/5.8.0
================================================
================================================
FILE: source-versions/5.8.1
================================================
================================================
FILE: source-versions/5.8.10
================================================
================================================
FILE: source-versions/5.8.11
================================================
================================================
FILE: source-versions/5.8.12
================================================
================================================
FILE: source-versions/5.8.13
================================================
================================================
FILE: source-versions/5.8.14
================================================
================================================
FILE: source-versions/5.8.15
================================================
================================================
FILE: source-versions/5.8.16
================================================
================================================
FILE: source-versions/5.8.17
================================================
================================================
FILE: source-versions/5.8.18
================================================
================================================
FILE: source-versions/5.8.19
================================================
================================================
FILE: source-versions/5.8.2
================================================
================================================
FILE: source-versions/5.8.23
================================================
================================================
FILE: source-versions/5.8.24
================================================
================================================
FILE: source-versions/5.8.25
================================================
================================================
FILE: source-versions/5.8.26
================================================
================================================
FILE: source-versions/5.8.27
================================================
================================================
FILE: source-versions/5.8.28
================================================
================================================
FILE: source-versions/5.8.29
================================================
================================================
FILE: source-versions/5.8.3
================================================
================================================
FILE: source-versions/5.8.30
================================================
================================================
FILE: source-versions/5.8.31
================================================
================================================
FILE: source-versions/5.8.32
================================================
================================================
FILE: source-versions/5.8.33
================================================
================================================
FILE: source-versions/5.8.34
================================================
================================================
FILE: source-versions/5.8.35
================================================
================================================
FILE: source-versions/5.8.4
================================================
================================================
FILE: source-versions/5.8.5
================================================
================================================
FILE: source-versions/5.8.6
================================================
================================================
FILE: source-versions/5.8.7
================================================
================================================
FILE: source-versions/5.8.8
================================================
================================================
FILE: source-versions/5.8.9
================================================
================================================
FILE: test/test_babel_transpiler.rb
================================================
require 'minitest/autorun'
require 'babel/transpiler'
class TestBabelTranspiler < MiniTest::Test
def test_source_constants
assert Babel::Source::VERSION
assert Babel::Source::DATE
assert Babel::Source::PATH
end
def test_source_path_directory
assert File.directory?("#{Babel::Transpiler.source_path}")
assert File.directory?("#{Babel::Transpiler.source_path}/babel")
assert File.file?("#{Babel::Transpiler.source_path}/babel.js")
assert File.file?("#{Babel::Transpiler.source_path}/babel/external-helpers.js")
assert File.file?("#{Babel::Transpiler.source_path}/babel/polyfill.js")
end
def test_script_path_readable
path = Babel::Transpiler.script_path
assert File.exist?(path)
assert File.read(path)
end
def test_version
assert Babel::Transpiler.version
assert Babel::Transpiler.source_version
end
def test_transform
code = Babel::Transpiler.transform("[0, 2, 4].map(v => v + 1)", "blacklist" => ["useStrict"])["code"]
assert_equal [1, 3, 5], ExecJS.exec("return #{code}")
code = Babel::Transpiler.transform("(function f(x, y = 12) { return x + y; })(3)", "blacklist" => ["useStrict"])["code"]
assert_equal 15, ExecJS.exec("return #{code}")
end
def test_transform_options
code = Babel::Transpiler.transform("ary.map(v => v + 1)", "whitelist" => ["useStrict"])["code"]
assert_match(/strict/, code)
code = Babel::Transpiler.transform("ary.map(v => v + 1)", "blacklist" => ["useStrict"])["code"]
refute_match(/strict/, code)
assert Babel::Transpiler.transform("ary.map(v => v + 1)", {}.freeze)["code"]
end
end
gitextract_fr5fwut_/
├── .gitignore
├── .travis.yml
├── Gemfile
├── LICENSE
├── MAINTAINING.md
├── README.md
├── SOURCE-BUILDS.md
├── babel-source.gemspec.erb
├── babel-transpiler.gemspec
├── lib/
│ ├── babel/
│ │ ├── source.rb.erb
│ │ ├── transpiler/
│ │ │ └── version.rb
│ │ └── transpiler.rb
│ └── babel-transpiler.rb
├── script/
│ ├── build-gem
│ ├── deploy
│ ├── eval-erb-template
│ ├── gem-version
│ ├── local-source-versions
│ ├── published-source-versions
│ ├── test
│ ├── test-gem
│ ├── unpublished-source-versions
│ └── validate-travis
├── source-versions/
│ ├── 4.0.1
│ ├── 4.0.2
│ ├── 4.1.1
│ ├── 4.2.0
│ ├── 4.2.1
│ ├── 4.3.0
│ ├── 4.4.1
│ ├── 4.4.2
│ ├── 4.4.3
│ ├── 4.4.4
│ ├── 4.4.5
│ ├── 4.4.6
│ ├── 4.5.0
│ ├── 4.5.2
│ ├── 4.5.3
│ ├── 4.5.4
│ ├── 4.5.5
│ ├── 4.6.0
│ ├── 4.6.1
│ ├── 4.6.2
│ ├── 4.6.3
│ ├── 4.6.4
│ ├── 4.6.5
│ ├── 4.6.6
│ ├── 4.7.0
│ ├── 4.7.1
│ ├── 4.7.10
│ ├── 4.7.11
│ ├── 4.7.12
│ ├── 4.7.13
│ ├── 4.7.14
│ ├── 4.7.15
│ ├── 4.7.16
│ ├── 4.7.2
│ ├── 4.7.3
│ ├── 4.7.4
│ ├── 4.7.5
│ ├── 4.7.6
│ ├── 4.7.7
│ ├── 4.7.8
│ ├── 4.7.9
│ ├── 5.0.0
│ ├── 5.0.0-beta1
│ ├── 5.0.0-beta2
│ ├── 5.0.0-beta3
│ ├── 5.0.0-beta4
│ ├── 5.0.1
│ ├── 5.0.10
│ ├── 5.0.11
│ ├── 5.0.12
│ ├── 5.0.13
│ ├── 5.0.2
│ ├── 5.0.3
│ ├── 5.0.4
│ ├── 5.0.5
│ ├── 5.0.6
│ ├── 5.0.7
│ ├── 5.0.8
│ ├── 5.0.9
│ ├── 5.1.0
│ ├── 5.1.1
│ ├── 5.1.10
│ ├── 5.1.11
│ ├── 5.1.12
│ ├── 5.1.13
│ ├── 5.1.2
│ ├── 5.1.3
│ ├── 5.1.4
│ ├── 5.1.5
│ ├── 5.1.6
│ ├── 5.1.7
│ ├── 5.1.8
│ ├── 5.1.9
│ ├── 5.2.0
│ ├── 5.2.1
│ ├── 5.2.10
│ ├── 5.2.11
│ ├── 5.2.12
│ ├── 5.2.13
│ ├── 5.2.14
│ ├── 5.2.15
│ ├── 5.2.16
│ ├── 5.2.17
│ ├── 5.2.2
│ ├── 5.2.6
│ ├── 5.2.7
│ ├── 5.2.8
│ ├── 5.2.9
│ ├── 5.3.0
│ ├── 5.3.1
│ ├── 5.3.2
│ ├── 5.3.3
│ ├── 5.4.0
│ ├── 5.4.1
│ ├── 5.4.2
│ ├── 5.4.3
│ ├── 5.4.4
│ ├── 5.4.5
│ ├── 5.4.6
│ ├── 5.4.7
│ ├── 5.6.0
│ ├── 5.6.1
│ ├── 5.6.11
│ ├── 5.6.12
│ ├── 5.6.13
│ ├── 5.6.14
│ ├── 5.6.15
│ ├── 5.6.16
│ ├── 5.6.17
│ ├── 5.6.18
│ ├── 5.6.19
│ ├── 5.6.2
│ ├── 5.6.20
│ ├── 5.6.3
│ ├── 5.6.4
│ ├── 5.6.5
│ ├── 5.6.6
│ ├── 5.6.7
│ ├── 5.8.0
│ ├── 5.8.1
│ ├── 5.8.10
│ ├── 5.8.11
│ ├── 5.8.12
│ ├── 5.8.13
│ ├── 5.8.14
│ ├── 5.8.15
│ ├── 5.8.16
│ ├── 5.8.17
│ ├── 5.8.18
│ ├── 5.8.19
│ ├── 5.8.2
│ ├── 5.8.23
│ ├── 5.8.24
│ ├── 5.8.25
│ ├── 5.8.26
│ ├── 5.8.27
│ ├── 5.8.28
│ ├── 5.8.29
│ ├── 5.8.3
│ ├── 5.8.30
│ ├── 5.8.31
│ ├── 5.8.32
│ ├── 5.8.33
│ ├── 5.8.34
│ ├── 5.8.35
│ ├── 5.8.4
│ ├── 5.8.5
│ ├── 5.8.6
│ ├── 5.8.7
│ ├── 5.8.8
│ └── 5.8.9
└── test/
└── test_babel_transpiler.rb
SYMBOL INDEX (17 symbols across 3 files)
FILE: lib/babel/transpiler.rb
type Babel (line 5) | module Babel
type Transpiler (line 6) | module Transpiler
function version (line 7) | def self.version
function source_version (line 11) | def self.source_version
function source_path (line 15) | def self.source_path
function script_path (line 19) | def self.script_path
function context (line 23) | def self.context
function transform (line 27) | def self.transform(code, options = {})
FILE: lib/babel/transpiler/version.rb
type Babel (line 1) | module Babel
type Transpiler (line 2) | module Transpiler
FILE: test/test_babel_transpiler.rb
class TestBabelTranspiler (line 4) | class TestBabelTranspiler < MiniTest::Test
method test_source_constants (line 5) | def test_source_constants
method test_source_path_directory (line 11) | def test_source_path_directory
method test_script_path_readable (line 19) | def test_script_path_readable
method test_version (line 25) | def test_version
method test_transform (line 30) | def test_transform
method test_transform_options (line 38) | def test_transform_options
Condensed preview — 175 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (24K chars).
[
{
"path": ".gitignore",
"chars": 24,
"preview": "*.gem\nGemfile.lock\ntmp/\n"
},
{
"path": ".travis.yml",
"chars": 998,
"preview": "language: ruby\ncache: bundler\nsudo: false\n\nscript: ./script/test\nafter_success: ./script/deploy\n\nenv:\n global:\n secu"
},
{
"path": "Gemfile",
"chars": 98,
"preview": "source 'https://rubygems.org'\ngemspec path: ENV['PWD']\n\ngem 'babel-source', ENV['SOURCE_VERSION']\n"
},
{
"path": "LICENSE",
"chars": 1055,
"preview": "Copyright (c) 2015 Joshua Peek\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this sof"
},
{
"path": "MAINTAINING.md",
"chars": 783,
"preview": "# Maintaining\n\n## Releasing a new version\n\nThis project follows [semver](http://semver.org/). Any gem dependency changes"
},
{
"path": "README.md",
"chars": 662,
"preview": "# Ruby Babel Transpiler\n\nRuby Babel is a bridge to the [JS Babel transpiler](https://babeljs.io).\n\n``` ruby\nrequire 'bab"
},
{
"path": "SOURCE-BUILDS.md",
"chars": 3736,
"preview": "# Babel Source Builds\n\nThe Ruby transpiler bridge is just a thin [ExecJS](https://github.com/rails/execjs) wrapper aroun"
},
{
"path": "babel-source.gemspec.erb",
"chars": 457,
"preview": "Gem::Specification.new do |s|\n s.name = 'babel-source'\n s.version = \"<%= version %>\"\n s.date = Time.at(<%= date %>)\n\n"
},
{
"path": "babel-transpiler.gemspec",
"chars": 740,
"preview": "require File.expand_path(\"../lib/babel/transpiler/version.rb\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'b"
},
{
"path": "lib/babel/source.rb.erb",
"chars": 149,
"preview": "module Babel\n module Source\n VERSION = \"<%= version %>\"\n DATE = Time.at(<%= date %>)\n PATH = File.expand_path("
},
{
"path": "lib/babel/transpiler/version.rb",
"chars": 65,
"preview": "module Babel\n module Transpiler\n VERSION = \"0.7.0\"\n end\nend\n"
},
{
"path": "lib/babel/transpiler.rb",
"chars": 586,
"preview": "require 'execjs'\nrequire 'babel/source'\nrequire 'babel/transpiler/version'\n\nmodule Babel\n module Transpiler\n def sel"
},
{
"path": "lib/babel-transpiler.rb",
"chars": 27,
"preview": "require 'babel/transpiler'\n"
},
{
"path": "script/build-gem",
"chars": 1007,
"preview": "#!/bin/bash\n\nset -e\nset -x\n\nVERSION=\"$1\"\nGEM_VERSION=$(./script/gem-version $VERSION)\n\nmkdir -p tmp/\npushd tmp/\n\nif [ ! "
},
{
"path": "script/deploy",
"chars": 689,
"preview": "#!/bin/bash\n\nset -e\n\nif [ -n \"$TRAVIS\" ] && ([ \"$TRAVIS_SECURE_ENV_VARS\" != \"true\" ] || [ \"$TRAVIS_BRANCH\" != \"master\" ]"
},
{
"path": "script/eval-erb-template",
"chars": 117,
"preview": "#!/usr/bin/env ruby\n\nrequire 'erb'\nversion, date = ARGV[1], ARGV[2]\nputs ERB.new(File.read(ARGV[0])).result(binding)\n"
},
{
"path": "script/gem-version",
"chars": 79,
"preview": "#!/bin/bash\nif [ -n \"$1\" ]; then\n echo $1 | sed s/-/./g\nelse\n sed s/-/./g\nfi\n"
},
{
"path": "script/local-source-versions",
"chars": 40,
"preview": "#!/bin/bash\nls ./source-versions | sort\n"
},
{
"path": "script/published-source-versions",
"chars": 183,
"preview": "#!/usr/bin/env ruby\n\nrequire 'json'\nrequire 'open-uri'\n\nurl = \"https://rubygems.org/api/v1/versions/babel-source.json\"\np"
},
{
"path": "script/test",
"chars": 279,
"preview": "#!/bin/bash\n\nset -e\n\nbundle exec ruby -w test/test_babel_transpiler.rb\n\nif [ -n \"$VALIDATE_TRAVIS\" ]; then\n ./script/va"
},
{
"path": "script/test-gem",
"chars": 367,
"preview": "#!/bin/bash\n\nset -e\nset -x\n\nexport VERSION=\"$1\"\nexport SOURCE_VERSION=$(./script/gem-version $VERSION)\n\nif [ ! -f \"tmp/v"
},
{
"path": "script/unpublished-source-versions",
"chars": 130,
"preview": "#!/bin/bash\ncomm -13 <(./script/published-source-versions | sort) <(./script/local-source-versions | ./script/gem-versio"
},
{
"path": "script/validate-travis",
"chars": 694,
"preview": "#!/usr/bin/env ruby\n\nrequire 'set'\nrequire 'yaml'\n\ndef version_constraints(versions)\n Set.new(versions.compact.map { |v"
},
{
"path": "source-versions/4.0.1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.0.2",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.1.1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.2.0",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.2.1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.3.0",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.4.1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.4.2",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.4.3",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.4.4",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.4.5",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.4.6",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.5.0",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.5.2",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.5.3",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.5.4",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.5.5",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.6.0",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.6.1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.6.2",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.6.3",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.6.4",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.6.5",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.6.6",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.0",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.10",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.11",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.12",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.13",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.14",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.15",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.16",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.2",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.3",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.4",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.5",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.6",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.7",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.8",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/4.7.9",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.0",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.0-beta1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.0-beta2",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.0-beta3",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.0-beta4",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.10",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.11",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.12",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.13",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.2",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.3",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.4",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.5",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.6",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.7",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.8",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.0.9",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.0",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.10",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.11",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.12",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.13",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.2",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.3",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.4",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.5",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.6",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.7",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.8",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.1.9",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.0",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.10",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.11",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.12",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.13",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.14",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.15",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.16",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.17",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.2",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.6",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.7",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.8",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.2.9",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.3.0",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.3.1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.3.2",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.3.3",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.4.0",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.4.1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.4.2",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.4.3",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.4.4",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.4.5",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.4.6",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.4.7",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.0",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.11",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.12",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.13",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.14",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.15",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.16",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.17",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.18",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.19",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.2",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.20",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.3",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.4",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.5",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.6",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.6.7",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.0",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.1",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.10",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.11",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.12",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.13",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.14",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.15",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.16",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.17",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.18",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.19",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.2",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.23",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.24",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.25",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.26",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.27",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.28",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.29",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.3",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.30",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.31",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.32",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.33",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.34",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.35",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.4",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.5",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.6",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.7",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.8",
"chars": 0,
"preview": ""
},
{
"path": "source-versions/5.8.9",
"chars": 0,
"preview": ""
},
{
"path": "test/test_babel_transpiler.rb",
"chars": 1628,
"preview": "require 'minitest/autorun'\nrequire 'babel/transpiler'\n\nclass TestBabelTranspiler < MiniTest::Test\n def test_source_cons"
}
]
About this extraction
This page contains the full source code of the babel/ruby-babel-transpiler GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 175 files (14.3 KB), approximately 9.0k tokens, and a symbol index with 17 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.