Module: Bundlebun

Defined in:
lib/bundlebun.rb,
lib/bundlebun/runner.rb,
lib/bundlebun/version.rb,
lib/bundlebun/integrations.rb,
lib/bundlebun/integrations/execjs.rb,
lib/bundlebun/integrations/vite_ruby.rb,
lib/bundlebun/integrations/jsbundling.rb,
lib/bundlebun/integrations/cssbundling.rb

Overview

bundlebun bundles Bun, a fast JavaScript runtime, package manager and builder, with your Ruby and Rails applications. No Docker, devcontainers, curl | sh, or brew needed.

bundlebun includes binary distributions of Bun for each of the supported platforms (macOS, Linux, Windows) and architectures.

See Also:

Defined Under Namespace

Modules: Integrations Classes: Runner

Constant Summary collapse

VERSION =

bundlebun uses the #{bundlebun.version}.#{bun.version} versioning scheme. gem bundlebun version 0.1.0.1.1.38 is a distribution that includes a gem with its own code version 0.1.0 and a Bun runtime with version 1.1.38.

This constant always points to the "own" version of the gem.

'0.1.0'

Class Method Summary collapse

Class Method Details

.bunObject Also known as: bun?, bun!



50
# File 'lib/bundlebun.rb', line 50

def bun = 'Bun'

.callInteger

Runs the Bun runtime with parameters.

A shortcut for Bundlebun::Runner.call.

Examples:

String as an argument

Bundlebun.call('--version') # => `bun --version`

Array of strings as an argument

Bundlebun.call(['add', 'postcss']) # => `bun add postcss`

Parameters:

  • arguments (String, Array<String>)

    Command arguments to pass to Bun

Returns:

  • (Integer)

    Exit status code (127 if executable not found)

See Also:



30
31
32
# File 'lib/bundlebun.rb', line 30

def call(...)
  Runner.call(...)
end