X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FJS.pm;h=f51000e85693665d81d3bcea6f5586fc1183c28e;hb=5c6aea9392c11422abe85788aac0f62ad3a4dd14;hp=dca5affe76e7ab247dbbfa0bdf40573d86d33b47;hpb=191f4979def520b8be01554eb954c80ee42df38b;p=gruntmaster-page.git diff --git a/lib/Gruntmaster/Page/JS.pm b/lib/Gruntmaster/Page/JS.pm index dca5aff..f51000e 100644 --- a/lib/Gruntmaster/Page/JS.pm +++ b/lib/Gruntmaster/Page/JS.pm @@ -1,13 +1,6 @@ package Gruntmaster::Page::JS; -use 5.014000; -use strict; -use warnings; use Gruntmaster::Page::Base; -our @ISA = qw/Gruntmaster::Page::Base/; -our $VERSION = '0.001'; - -use File::Slurp qw/read_file/; use JavaScript::Minifier::XS qw/minify/; sub generate{ @@ -15,9 +8,7 @@ sub generate{ debug $env => ""; my $js; $js .= read_file $_ for ; - [200, ['Content-Type' => 'application/javascript', 'Cache-Control' => 'public, max-age=604800'], [$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]] } - 1