Доброго всем

Mojolicious::Plugin::AssetPack::Che

¡ ¡ ¡ ALL GLORY TO GLORIA ! ! !

NAME

Mojolicious::Plugin::AssetPack::Che - Child of Mojolicious::Plugin::AssetPack for little bit code.

DESCRIPTION

Can process assets during register plugin.

Can nested assets.

Can pipe HTML files with Mojolicious::Plugin::AssetPack::Pipe::HTML.

Can compile Vue templates Mojolicious::Plugin::AssetPack::Pipe::VueTemplateCompiler.

Can pipe CSS, JS, JSON, HTML with Mojolicious::Plugin::AssetPack::Pipe::CombineFile into disk cache. This pipe can also gzip and cache gzipped assets.

Since parent version 1.28.

VERSION

Version 2.106 (test on base Mojolicious::Plugin::AssetPack v2.10)

SYNOPSIS

See parent module Mojolicious::Plugin::AssetPack for full documentation.

On register the plugin config can contain additional optional argument process:

$app->plugin('AssetPack::Che',
  pipes => [qw(Sass Css JavaScriptPacker HTML CombineFile)],
  CombineFile => { gzip => {min_size => 1000},}, # pipe options
  HTML => {minify_opts=>{remove_newlines => 1,}},# pipe based on HTML::Packer
  JavaScriptPacker => {minify_opts=>{}},# pipe based on JavaScript::Packer
  process => [
    ['foo.js' => qw(path/to/foo1.js path/to/foo2.js)],
    ['bar.js' => qw(foo.js path/to/bar1.js path/to/bar2.js)], # nested topic
    ['foo.html' => qw(path/to/foo1.html path/to/foo2.html)],
    ...
  ],
);

SEE ALSO

Mojolicious::Plugin::AssetPack

AUTHOR

Михаил Че (Mikhail Che), <mche[-at-]cpan.org>

BUGS / CONTRIBUTING

Please report any bugs or feature requests at https://github.com/mche/Mojolicious-Plugin-AssetPack-Che/issues. Pull requests also welcome.

COPYRIGHT

Copyright 2016-2020 Mikhail Che.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.