Module: ZephyrRb

Defined in:
lib/zephyr_rb.rb,
lib/zephyr_rb/cli.rb,
lib/zephyr_rb/version.rb

Defined Under Namespace

Classes: Builder, CLI, Error

Constant Summary collapse

VERSION =
"1.0.1b"
RUBY_WASM_VERSION =
"3.4-wasm-wasi@2.7.1"

Class Method Summary collapse

Class Method Details

.asset_pathObject

Get the path to the bundled zephyr.js file



10
11
12
# File 'lib/zephyr_rb.rb', line 10

def self.asset_path
  File.expand_path("../dist/zephyr.js", __dir__)
end

.build!Object

Build the zephyr.js file



20
21
22
# File 'lib/zephyr_rb.rb', line 20

def self.build!
  CLI.build
end

.built?Boolean

Check if the zephyr.js file exists

Returns:

  • (Boolean)


15
16
17
# File 'lib/zephyr_rb.rb', line 15

def self.built?
  File.exist?(asset_path)
end