Import some changes from the mindcoding branch
[gruntmaster-page.git] / lib / Gruntmaster / Page / JS.pm
CommitLineData
7dc32473
MG
1package Gruntmaster::Page::JS;
2
7dc32473 3use Gruntmaster::Page::Base;
7dc32473
MG
4use JavaScript::Minifier::XS qw/minify/;
5
6sub generate{
191f4979
MG
7 my ($self, $format, $env) = @_;
8 debug $env => "";
7dc32473
MG
9 my $js;
10 $js .= read_file $_ for <js/*.js>;
f65bc88e 11 [200, ['Content-Type' => 'application/javascript', 'Cache-Control' => 'public, max-age=604800', 'X-Forever' => 1], [minify $js] ]
7dc32473
MG
12}
13
7dc32473 141
This page took 0.010723 seconds and 4 git commands to generate.