Module: AWSCDK::ILocalBundling

Defined in:
i_local_bundling.rb

Overview

Local bundling.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



22
23
24
25
26
# File 'i_local_bundling.rb', line 22

def self.jsii_overridable_methods
  {
    :try_bundle => { kind: :method, name: "tryBundle", is_optional: false },
  }
end

Instance Method Details

#try_bundle(output_dir, options) ⇒ Boolean

This method is called before attempting docker bundling to allow the bundler to be executed locally.

If the local bundler exists, and bundling was performed locally, return true. Otherwise, return false.

Parameters:

  • output_dir (String)

    the directory where the bundled asset should be output.

  • options (AWSCDK::BundlingOptions)

    bundling options for this asset.

Returns:

  • (Boolean)


15
16
17
18
19
20
# File 'i_local_bundling.rb', line 15

def try_bundle(output_dir, options)
  Jsii::Type.check_type(output_dir, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "outputDir")
  options = options.is_a?(Hash) ? ::AWSCDK::BundlingOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5CdW5kbGluZ09wdGlvbnMifQ==")), "options")
  jsii_call_method("tryBundle", [output_dir, options])
end