#!/usr/bin/perl -w
BEGIN {
    unshift @INC, split(/:/, $ENV{TWIKI_LIBS} || '../lib' );
}

use JavaScript::Minifier qw(minify);

foreach my $file (@ARGV) {
  open(INFILE, $file) or die "failed opening $file";
  my $result = minify(input => *INFILE);
  close(INFILE);
  print "$result;\n";
}
