1Mojolicious::Plugin::AsUsseetrPaCcokn:t:rPiibMpuoetj:eo:dlSiaPcseisro(lu3s)D:o:cPulmuegnitna:t:iAosnsetPack::Pipe::Sass(3)
2
3
4
6 Mojolicious::Plugin::AssetPack::Pipe::Sass - Process sass and scss
7 files
8
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
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
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
62 process
63 See "process" in Mojolicious::Plugin::AssetPack::Pipe.
64
66 Mojolicious::Plugin::AssetPack.
67
68
69
70perl v5.32.1 M2o0j2o1l-i0c1i-o2u7s::Plugin::AssetPack::Pipe::Sass(3)