module

BunBunBundle::Manifest

Constants

ASSET_SRI = {} of String => Array(String)
ASSETS = {} of String => String
CONFIG = {loaded: false}

Class methods

css_entry_points

Returns all CSS entry points from the manifest.

dynamic_asset(path : String) : String

Returns the fingerprinted path for an asset (runtime lookup).

Use this when you need string interpolation or variables.

BunBunBundle::Manifest.dynamic_asset("images/icon-#{name}.png")
dynamic_asset_sri(path : String) : Array(String)

Returns the Subresource Integrity digests for an asset, or an empty array if none were computed at build time.

Macros

asset(path)

Returns the fingerprinted path for an asset (compile-time check).

BunBunBundle::Manifest.asset("js/app.js")
# => "/assets/js/app-eb1157b7.js"
load(manifest_file = "")

Loads the asset manifest at compile time.

Call this once during app setup:

BunBunBundle::Manifest.load

# Or with a custom manifest path:
BunBunBundle::Manifest.load("public/custom-manifest.json")