File: README.md

package info (click to toggle)
libmojolicious-plugin-assetpack-perl 2.13-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 1,884 kB
  • sloc: perl: 1,489; javascript: 52; makefile: 8; sh: 2
file content (30 lines) | stat: -rw-r--r-- 909 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

# Mojolicious::Plugin::AssetPack [![](https://github.com/mojolicious/mojo-assetpack/workflows/linux/badge.svg)](https://github.com/mojolicious/mojo-assetpack/actions)

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

```perl
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](http://perlbrew.pl) environment.