- Notifications
You must be signed in to change notification settings - Fork37
Ruby to JavaScript conversion
License
NotificationsYou must be signed in to change notification settings
ruby2js/ruby2js
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
require'ruby2js'putsRuby2JS.convert("a = {age: 3}; a.age += 1",preset:true)# => let a = {age: 3}; a.age++
ruby2js --preset file.rbecho"puts 'hello'"| ruby2js --preset
- Filters - Transform Ruby methods to JavaScript equivalents (e.g.,
.each→.forEach) - ES Level Support - Target specific JavaScript versions (ES2020 through ES2025)
- Framework Integrations - Rails, Stimulus, React, Lit, and more
- Live Demo - Try it in your browser (runs entirely client-side via Opal)
bundle installbundleexec rake test_allTheruby2js.com website (including the live demo) can be run locally from thedocs folder:
cd docsbundle installyarn installbundleexec rake# build demo assets (Opal-compiled ruby2js, etc.)bin/bridgetown start# run the site's dev server
The site will be available athttp://localhost:4000.
- Update the version in both
packages/ruby2js/package.jsonandlib/ruby2js/version, ensuring they match. - Run
bundle exec rake release_core
MIT License - Copyright (c) 2009, 2025 Macario Ortega, Sam Ruby, Jared White
SeeLICENSE for details.
About
Ruby to JavaScript conversion
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.