NAME

Mojolicious::Plugin::AssetPack::Pipe::Reloader - Automatically reload assets in browser

SYNOPSIS

Application

$app->plugin(AssetPack => {pipes => ["Reloader"]);

Template

%= asset "reloader.js" if app->mode eq "development"

DESCRIPTION

Mojolicious::Plugin::AssetPack::Pipe::Reloader is a pipe which will create an asset called "reloader.js". This asset will automatically reload the page in the browser when one of the assets change on disk. This is done without the need of morbo.

This feature is EXPERIMENTAL, UNSTABLE and only meant to be used while developing.

METHODS

before_process

See "before_process" in Mojolicious::Plugin::AssetPack::Pipe.

new

Used to add a special "reloader.js" asset and a "/mojo-assetpack-reloader-ws" WebSocket endpoint.

process

This method does nothing.

SEE ALSO

Mojolicious::Plugin::AssetPack.