Dai Okabayashi > Plack-Middleware-Static-Minifier > Plack::Middleware::Static::Minifier

Download:
Plack-Middleware-Static-Minifier-0.08.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.08   Source  

NAME ^

Plack::Middleware::Static::Minifier - serves static files and minify CSS and JavaScript

SYNOPSIS ^

    use Plack::Builder;
    builder {
        enable "Plack::Middleware::Static::Minifier",
            path => qr{^/(js|css|images)/},
            root => './htdocs/';
        $app;
    };

or you can cache minified content

    use Plack::Builder;
    use Cache::FileCache;

    my $cache = Cache::FileCache->new(+{
        cache_root         => '/tmp/foo',
        namespace          => 'namespace',
        default_expires_in => 60*60*24*7,
    });

    builder {
        enable "Plack::Middleware::Static::Minifier",
            path  => qr{^/(js|css|images)/},
            root  => './htdocs/',
            cache => $cache;
        $app;
    };

DESCRIPTION ^

Plack::Middleware::Static::Minifier serves static files with Plack and minify CSS and JavaScript. This module is the subclass of Plack::Middleware::Static.

See Plack::Middleware::Static for more detail.

METHOD ^

call

REPOSITORY ^

Plack::Middleware::Static::Minifier is hosted on github <http://github.com/bayashi/Plack-Middleware-Static-Minifier>

AUTHOR ^

Dai Okabayashi <bayashi@cpan.org>

SEE ALSO ^

Plack::Middleware::Static, CSS::Minifier::XS, JavaScript::Minifier::XS Plack::Middleware, Plack

LICENSE ^

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

syntax highlighting: