module
Amber::Assets
Overview
Runtime access to the build-time static asset manifest.
Asset compilation belongs in the build or deploy step. Amber only reads the resulting manifest while serving requests, so production filesystems can be read-only and request latency never includes asset generation.
Defined in:
amber/assets.crConstant Summary
-
DEFAULT_MANIFEST_PATH =
"public/assets/manifest.json"
Class Method Summary
-
.configure(*, manifest_path : String = DEFAULT_MANIFEST_PATH) : Nil
Configures the persisted manifest Amber reads.
- .entry(logical_path : String) : Entry
- .expected_public_path(logical_path : String, digest : String, public_path : String) : String
- .integrity(logical_path : String) : String
- .manifest : Manifest
- .manifest_path : String
- .normalize_logical_path(path : String) : String
- .normalize_public_path(path : String) : String
- .path(logical_path : String) : String
- .public_reference?(path : String) : Bool
-
.reload! : Manifest
Clears the cached manifest.
-
.resolve(path : String) : String
Absolute, protocol, fragment, and data URLs are already public references and remain unchanged.
Class Method Detail
Configures the persisted manifest Amber reads. Relative paths are resolved by the application process, normally from the project root.
Clears the cached manifest. This is useful after an in-process development build and in tests; production applications normally never need it.
Absolute, protocol, fragment, and data URLs are already public references and remain unchanged. Other values are strict logical manifest keys.