Hwaro::Content::Hooks::AssetHooks
Inherits Hwaro::Core::Lifecycle::Hookable < Reference < Object
Class methods
asset_integrity(name): the SRI value of what asset(name) serves.
A file the Write phase has yet to copy (or, under --cache, still
holds the previous copy of) is hashed from its source — the copy is
verbatim — so cold and warm builds agree. Any other path counts only
when this build publishes it: a --cache build keeps the previous
build's files until Finalize prunes them, and hashing one of those
(a deleted static file, a now-withheld bundle asset) printed the
value of a file about to vanish where a cold build raised. Nil when
nothing is published there.
The emitted file asset(name) points to: the manifest bundle, else
name under the output root. Nil before a build ran, or when the
path leaves the output directory.