class

Mint::Ast::Directives::FileBased

Inherits Mint::Errorable < Mint::Ast::Node < Reference < Object

Constructors

new(from : Parser::Location, to : Parser::Location, file : Parser::File, path : String)
Source

Instance methods

exists?

Returns whether the file exists.

Source
file_contents

Returns the files contents.

Source
filename(*, build : Bool) : String | Nil

Returns the hashed filename of the target. For the build version it uses the the file contents as the hash value to make sure that the file will not be cached.

Source
path

The given path of the asset, relative to the source file.

Source
real_path

The real path of the asset on the disk.

Source
relative_path

The relative path of the asset to the project root (closest mint.json).

Source