mojolicious / mojo-assetpack

:tractor: Compress and convert CSS, Less, Sass and JavaScript files

Home Page:https://metacpan.org/pod/Mojolicious::Plugin::AssetPack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mojolicious::Plugin::AssetPack

Compress and convert CSS, Less, Sass, JavaScript and CoffeeScript files.

use Mojolicious::Lite;

# Load plugin and pipes in the right order
plugin AssetPack => {pipes => [qw(Less Sass Css CoffeeScript Riotjs JavaScript Combine)]};

# define asset
app->asset->process(
  # virtual name of the asset
  "app.css" => (

    # source files used to create the asset
    "sass/bar.scss",
    "https://github.com/Dogfalo/materialize/blob/master/sass/materialize.scss",
  )
);

Installation

All you need is a one-liner, it takes less than a minute.

$ curl -L https://cpanmin.us | perl - -M https://cpan.metacpan.org -n Mojolicious::Plugin::AssetPack

We recommend the use of a Perlbrew environment.

About

:tractor: Compress and convert CSS, Less, Sass and JavaScript files

https://metacpan.org/pod/Mojolicious::Plugin::AssetPack

License:Artistic License 2.0


Languages

Language:Perl 98.2%Language:JavaScript 1.1%Language:Vue 0.4%Language:SCSS 0.3%Language:CSS 0.1%Language:Shell 0.0%