| Catalyst::View::CSS::Minifier::XS - Minify your served CSS files |
Catalyst::View::CSS::Minifier::XS - Minify your served CSS files
version 1.093050
# creating MyApp::View::CSS ./script/myapp_create.pl view CSS CSS::Minifier::XS
# in your controller file, as an action sub css : Local { my ( $self, $c ) = @_;
# load root/css/style1.css and root/css/style2.css
$c->stash->{css} = [qw/style1 style2/];
$c->forward("View::CSS");
}
# in your html template use <link rel="stylesheet" type="text/css" media="screen" href="/css" />
Use your minified css files as a separated catalyst request. By default they
are read from $c->stash->{css} as array or string.
sets a different stash variable from the default $c->stash->{css}
sets a different path for your css files
default : css
setting this to true will take your css files (stash variable) from your referer action
# in your controller sub action : Local { my ( $self, $c ) = @_;
# load exclusive.css only when /action is loaded
$c->stash->{css} = "exclusive";
}
This could be very dangerous since it's using
$c->forward($c->request->headers->referer). It doesn't work with the
index action!
default : false
Catalyst , the Catalyst::View manpage, the CSS::Minifier::XS manpage
Ivan Drinchev <drinchev (at) gmail (dot) com> Arthur Axel "fREW" Schmidt <frioux@gmail.com>
This software is copyright (c) 2009 by Ivan Drinchev <drinchev (at) gmail (dot) com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
| Catalyst::View::CSS::Minifier::XS - Minify your served CSS files |