NAME Mojolicious::Plugin::AssetPack - Compress and convert css, less, sass and javascript files VERSION 0.07 SYNOPSIS In your application: use Mojolicious::Lite; plugin 'AssetPack'; # define assets: $moniker => @real_assets app->asset('app.js' => '/js/foo.js', '/js/bar.js'); app->asset('app.css' => '/css/foo.less', '/css/bar.scss', '/css/main.css'); # you can combine with assets from web app->asset('bundle.js' => ( 'http://cdnjs.cloudflare.com/ajax/libs/es5-shim/2.3.0/es5-shim.js', 'http://cdnjs.cloudflare.com/ajax/libs/es5-shim/2.3.0/es5-sham.js', 'http://code.jquery.com/jquery-1.11.0.js', '/js/myapp.js', )); app->start; In your template: %= asset 'app.js' %= asset 'app.css' Or if you need to add the tags manually: % for my $asset (asset->get('app.js')) { %= javascript $asset % } See also "register". DESCRIPTION Production mode This plugin will compress scss, less, css and javascript with the help of external applications on startup. The result will be one file with all the sources combined. This file is stored in "Packed directory". The files in the packed directory will have a checksum added to the filename which will ensure broken browsers request a new version once the file is changed. Example: