See homepage for examples etc.
Ruby is distributed as a gem, so install with:
$ gem install opal
Opal has a built in REPL that uses
therubyracer to hold a built in
context. Try the REPL with:
$ opal irb
Using in the browser
require "opal/bundle_task" Opal::BundleTask.new do |t| t.name = "my_project" t.version = "0.0.1" end
rake bundle. See the bundle
guide for more
This repo contains the code for the opal gem as well as the opal core
library and runtime. Files inside
lib/ are the files that
are used as part of the gem and run directly on your ruby environment.
corelib/ contains opal's core library implementation and is not used
directly by the gem. These files are precompiled during development
ready to be used in the gem or in a browser.
directly by the gem, but is built ready to use in the js contexts that
stdlib/ contains the stdlib files that opal comes packaged with. The
gem does use these, but only as required. Opal does not include the full
optimal performance. These can be
require() at runtime.
opal-parser.js are included in the gem, but not the
source repo. They are the latest built versions of opal and its parser
which are built before the gem is published.