Sha256: 408e1d97a16b215b66fc850f2fc0a05cda45b608ed00e8a30ec65330f5d60afa

Contents?: true

Size: 594 Bytes

Versions: 19

Compression:

Stored size: 594 Bytes

Contents

# frozen_string_literal: true

module Proscenium
  class Esbuild
    class CompileError < StandardError; end

    extend ActiveSupport::Autoload

    autoload :Golib

    def self.build(...)
      new(...).build
    end

    def initialize(path, root:, base_url:)
      @path = path
      @root = root
      @base_url = base_url
    end

    def build
      Proscenium::Esbuild::Golib.new(root: @root, base_url: @base_url).build(@path)
    end

    private

    def cache_query_string
      q = Proscenium.config.cache_query_string
      q ? "--cache-query-string #{q}" : nil
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
proscenium-0.9.1-x86_64-linux lib/proscenium/esbuild.rb
proscenium-0.9.1-aarch64-linux lib/proscenium/esbuild.rb
proscenium-0.9.1-arm64-darwin lib/proscenium/esbuild.rb
proscenium-0.9.1-x86_64-darwin lib/proscenium/esbuild.rb
proscenium-0.9.0-x86_64-linux lib/proscenium/esbuild.rb
proscenium-0.9.0-aarch64-linux lib/proscenium/esbuild.rb
proscenium-0.9.0-arm64-darwin lib/proscenium/esbuild.rb
proscenium-0.9.0-x86_64-darwin lib/proscenium/esbuild.rb
proscenium-0.8.2-x86_64-linux lib/proscenium/esbuild.rb
proscenium-0.8.2-aarch64-linux lib/proscenium/esbuild.rb
proscenium-0.8.2-arm64-darwin lib/proscenium/esbuild.rb
proscenium-0.8.2-x86_64-darwin lib/proscenium/esbuild.rb
proscenium-0.8.0-aarch64-linux lib/proscenium/esbuild.rb
proscenium-0.8.0-arm64-darwin lib/proscenium/esbuild.rb
proscenium-0.8.0-x86_64-darwin lib/proscenium/esbuild.rb
proscenium-0.7.0-x86_64-linux lib/proscenium/esbuild.rb
proscenium-0.7.0-aarch64-linux lib/proscenium/esbuild.rb
proscenium-0.7.0-arm64-darwin lib/proscenium/esbuild.rb
proscenium-0.7.0-x86_64-darwin lib/proscenium/esbuild.rb