Web::AssetLib::MinifierEngine - a base class for writing your own Minifier Engine
package My::Library::MinifierEngine; use Method::Signatures; use Moose; extends 'Web::AssetLib::MinifierEngine'; method minify( :$contents!, :$type ) { # do minification return $minified; }
If you have a need for a special file minification scenario, you can simply extend this class, and it will plug in to the rest of the Web::AssetLib pipeline.
The only requirement is that your Output Engine implements the minify(...) method, which returns the minfied string.
$contents and $type are both strings. Minify the content, and return it as a string.
$contents
$type
Web::AssetLib::MinifierEngine::Standard
Ryan Lang <rlang@cpan.org>
To install Web::AssetLib, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Web::AssetLib
CPAN shell
perl -MCPAN -e shell install Web::AssetLib
For more information on module installation, please visit the detailed CPAN module installation guide.