Sha256: 9e8c35b965cd372520fdc0811d4c3aa01c17446eff7ecf13efafac0d3c87a381

Contents?: true

Size: 972 Bytes

Versions: 6

Compression:

Stored size: 972 Bytes

Contents

# frozen_string_literal: true
module Opal
  # `Opal::CliRunners` is the namespace in which JavaScript runners can be
  # defined for use by `Opal::CLI`. The API for classes defined under
  # `CliRunners` is the following.
  #
  # - The #initialize method takes an `Hash` containing an `output:` object.
  #   Additional keys can be safely ignored and can be specific to a particular
  #   runner, e.g. the `CliRunners::Server` runner will accepts a `port:`
  #   option.
  # - The runner instance will then be called via `#run(compiled_source, argv)`:
  #   - `compiled_source` is a string of JavaScript code
  #   - `argv` is the arguments vector coming from the CLI that is being
  #     forwarded to the program
  #
  module CliRunners
    class RunnerError < StandardError
    end
  end
end

require 'opal/cli_runners/applescript'
require 'opal/cli_runners/nodejs'
require 'opal/cli_runners/server'
require 'opal/cli_runners/nashorn'
require 'opal/cli_runners/chrome'

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
opal-0.11.4 lib/opal/cli_runners.rb
opal-0.11.3 lib/opal/cli_runners.rb
opal-0.11.2 lib/opal/cli_runners.rb
opal-0.11.1 lib/opal/cli_runners.rb
opal-0.11.1.pre lib/opal/cli_runners.rb
opal-0.11.0 lib/opal/cli_runners.rb