class

Marten::Asset::Engine

Inherits Reference / Object

Represents an assets engine.

An assets engine holds a storage to collect, persist and resolve asset URLs, as well as finders to discover the assets to collect.

Constructors

new(storage : Core::Storage::Base)
Source

Instance methods

find(filepath : String) : String

Returns the absolute path corresponding to the passed asset file path.

Source
finders
Source
manifests
Source
manifests=(manifests : Array(String))
Source
storage
Source
url(filepath : String) : String

Returns the URL associated with the passed file name or file path.

If manifests are configured, those will be used in order to try to map the passed filepath to a real file path that is fingerprinted. The passed filepath will be used as is if it is not present in the configured manifests (or if there are no configured manifests at all).

Source