Sha256: 2da6bd8cb338398a2e8abfc356b081cb1d9e79162c49be197b9526378cd3510e

Contents?: true

Size: 557 Bytes

Versions: 5

Compression:

Stored size: 557 Bytes

Contents

# frozen_string_literal: true

require_relative "esbuild/version"
require_relative "esbuild/packet"
require_relative "esbuild/stdio_protocol"
require_relative "esbuild/service"

module Esbuild
  class << self
    def build(options)
      service.build_or_serve(options)
    end

    def serve(serve_options, build_options)
      service.build_or_serve(build_options, serve_options)
    end

    def transform(input, options = {})
      service.transform(input, options)
    end

    private

    def service
      @service ||= Service.new
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
esbuild-0.2.1 lib/esbuild.rb
esbuild-0.2.0 lib/esbuild.rb
esbuild-0.1.2 lib/esbuild.rb
esbuild-0.1.1 lib/esbuild.rb
esbuild-0.1.0 lib/esbuild.rb