我希望使用javascript::minify包中的minify模块将目录树中的所有js文件缩小,但无法执行此操作。我成功地为单个文件执行了这个操作,但是当我为整个目录运行它时,我在minify.pm文件的第345行收到警告消息。下面是我想出的代码:use JavaScript::Minifier qw(minify);
if (-f and /\.js$/) {OUTFILE);
close(IN
error I get:Compacting JavaScript code can save many bytes of data and speed up downloadingMinifyJavaScript for the following resources to reduce their size by 254B (22% reduction).
我的JavaScript文件被缩小了(如您在第二张图像