]> iEval git - plack-app-gruntmaster.git/blame - lib/Gruntmaster/Page/JS.pm
Modernize templates
[plack-app-gruntmaster.git] / lib / Gruntmaster / Page / JS.pm
CommitLineData
7dc32473
MG
1package Gruntmaster::Page::JS;
2
3use 5.014000;
4use strict;
5use warnings;
6use Gruntmaster::Page::Base;
7our @ISA = qw/Gruntmaster::Page::Base/;
8our $VERSION = '0.001';
9
10use File::Slurp qw/read_file/;
11use JavaScript::Minifier::XS qw/minify/;
12
13sub generate{
14 my ($self, $format, $logger) = @_;
15 debug $logger => "";
16 my $js;
17 $js .= read_file $_ for <js/*.js>;
a94f8453 18 [200, ['Content-Type' => 'application/javascript', 'Cache-Control' => 'max-age=604800'], [$js] ]
7dc32473
MG
19}
20
21sub variants{ [[js => 1, 'application/javascript', undef, undef, undef, undef]] }
22
231
This page took 0.026286 seconds and 4 git commands to generate.