From: Marius Gavrilescu Date: Tue, 11 Feb 2014 07:38:47 +0000 (+0200) Subject: Minify javascript X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=f65bc88e9c4cfa7f17a32590728a4531a2356bbc;hp=-c;p=plack-app-gruntmaster.git Minify javascript --- f65bc88e9c4cfa7f17a32590728a4531a2356bbc diff --git a/lib/Gruntmaster/Page/JS.pm b/lib/Gruntmaster/Page/JS.pm index 9e78192..b8ddafb 100644 --- a/lib/Gruntmaster/Page/JS.pm +++ b/lib/Gruntmaster/Page/JS.pm @@ -15,7 +15,7 @@ sub generate{ debug $env => ""; my $js; $js .= read_file $_ for ; - [200, ['Content-Type' => 'application/javascript', 'Cache-Control' => 'public, max-age=604800', 'X-Forever' => 1], [$js] ] + [200, ['Content-Type' => 'application/javascript', 'Cache-Control' => 'public, max-age=604800', 'X-Forever' => 1], [minify $js] ] } sub variants{ [[js => 1, 'application/javascript', undef, undef, undef, undef]] }