Use brotli in make_static.PL if available
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 19 Mar 2017 13:20:30 +0000 (15:20 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 19 Mar 2017 13:20:30 +0000 (15:20 +0200)
make_static.PL

index f599a56b5db514f6b15e87a1e9ae71b89d4afa2b..e63b59f9608e035ddd1efdd54d44979a52035505 100644 (file)
@@ -15,7 +15,9 @@ mkdir 'static/js';
 
 sub gzip_file {
        my ($file) = @_;
 
 sub gzip_file {
        my ($file) = @_;
+       my $brotli = which 'brotli';
        my $zopfli = which 'zopfli';
        my $zopfli = which 'zopfli';
+       system $brotli => '--input', $file, '--output', "$file.br" if $brotli;
        system $zopfli => $file if $zopfli;
        gzip $file => "$file.gz", -Level => 9, Minimal => 1 unless $zopfli;
 }
        system $zopfli => $file if $zopfli;
        gzip $file => "$file.gz", -Level => 9, Minimal => 1 unless $zopfli;
 }
This page took 0.010909 seconds and 4 git commands to generate.