BunBundle.Manifest (bun_bundle v0.1.1)

Copy Markdown View Source

Reads bun-manifest.json and resolves source paths to fingerprinted URLs.

Runs as a supervised GenServer that owns a public ETS table for lock-free reads. On every lookup the manifest file's mtime is checked and the cache is reloaded if it changed. That keeps dev builds fresh without polling.

Example

iex> BunBundle.Manifest.lookup("js/app.js")
%BunBundle.Manifest.Entry{url: "js/app-abc123.js", sri: ["sha384-..."]}

Summary

Functions

Returns the full manifest as a map of path to entry.

Returns a specification to start this module under a supervisor.

Returns the manifest keys that point at CSS entry points.

Returns the entry for path or nil if not present.

Returns the entry for path or raises MissingAssetError.

Functions

all()

Returns the full manifest as a map of path to entry.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

css_entry_points()

Returns the manifest keys that point at CSS entry points.

lookup(path)

Returns the entry for path or nil if not present.

lookup!(path)

Returns the entry for path or raises MissingAssetError.

start_link(opts)