NAME

Web::AssetLib::InputEngine::LocalFile - allows importing an asset from your local filesystem

SYNOPSIS

my $library = My::AssetLib::Library->new(
    input_engines => [
        Web::AssetLib::InputEngine::LocalFile->new(
            search_paths => [ '/my/local/asset/dir' ]
        )
    ]
);

# asset existing at "/my/local/asset/dir/myfile.js":
my $asset = Web::AssetLib::Asset->new(
    type         => 'javascript',
    input_engine => 'LocalFile',
    input_args   => { path => "myfile.js", }
);

$library->compile( asset => $asset );

USAGE

Instantiate with search_paths parameter, and include in your library's input engine list.

Assets using the LocalFile input engine must provide path input arg.

ATTRIBUTES

search_paths

Arrayref of local filesystem root paths to search when looking for an asset.

METHODS

allSearchPaths

   my @paths = $engine->allSearchPaths();

Returns a list of search paths.

SEE ALSO

Web::AssetLib::InputEngine

Web::AssetLib::InputEngine::RemoteFile

Web::AssetLib::InputEngine::Content

AUTHOR

Ryan Lang <rlang@cpan.org>