1Mojolicious::Plugin::AsUsseetrPaCcokn:t:rPiibMpuoetj:eo:dlSiaPcseisro(lu3s)D:o:cPulmuegnitna:t:iAosnsetPack::Pipe::Sass(3)
2
3
4

NAME

6       Mojolicious::Plugin::AssetPack::Pipe::Sass - Process sass and scss
7       files
8

SYNOPSIS

10   Application
11         plugin AssetPack => {pipes => [qw(Sass Css Combine)]};
12
13         $self->pipe("Sass")->functions({
14           q[image-url($arg)] => sub {
15             my ($pipe, $arg) = @_;
16             return sprintf "url(/assets/%s)", $_[1];
17           }
18         });
19
20   Sass file
21       The sass file below shows how to use the custom "image-url" function:
22
23         body {
24           background: #fff image-url('img.png') top left;
25         }
26

DESCRIPTION

28       Mojolicious::Plugin::AssetPack::Pipe::Sass will process sass and scss
29       files.
30
31       This module require either the optional module CSS::Sass or the "sass"
32       program to be installed. "sass" will be automatically installed using
33       <https://rubygems.org/> unless already available.
34

ATTRIBUTES

36   functions
37         $hash_ref = $self->functions;
38
39       Used to define custom SASS functions. Note that the functions will be
40       called with $self as the first argument, followed by any arguments from
41       the SASS function. This invocation is EXPERIMENTAL, but will hopefully
42       not change.
43
44       This attribute requires CSS::Sass to work. It will not get passed on to
45       the "sass" executable.
46
47       See "SYNOPSIS" for example.
48
49   generate_source_map
50         $bool = $self->generate_source_map;
51         $self = $self->generate_source_map(1);
52
53       This pipe will generate source maps if true. Default is "1" if "mode"
54       in Mojolicious is "development".
55
56       See also
57       <http://thesassway.com/intermediate/using-source-maps-with-sass> and
58       <https://robots.thoughtbot.com/sass-source-maps-chrome-magic> for more
59       information about the usefulness.
60
61       See also Mojolicious::Plugin::AssetPack::Guides::Developing/Faster
62       development cycle> for how to reload the page when changes are done
63       inside the browser's dev tools.
64

METHODS

66   process
67       See "process" in Mojolicious::Plugin::AssetPack::Pipe.
68

SEE ALSO

70       Mojolicious::Plugin::AssetPack.
71
72
73
74perl v5.30.1                     M2o0j2o0l-i0c1i-o3u0s::Plugin::AssetPack::Pipe::Sass(3)
Impressum