5 use CSS
::Minifier
::XS qw
//;
6 use JavaScript
::Minifier
::XS qw
//;
8 use File
::Slurp qw
/read_file write_file/;
14 $common_css .= read_file
$_ for <css
/*.css
>;
15 for (<css
/themes/*>) {
16 my ($theme) = m
,themes
/(.*)\
.css
,;
17 my $css = read_file
$_;
19 write_file
"static/css/$theme.css", CSS
::Minifier
::XS
::minify
$css;
22 if (-f
'compiler.jar') {
23 system java
=> -jar
=> 'compiler.jar', qw
,-O SIMPLE
--create_source_map static
/js.map --js_output_file static/js
.js
--language_in ECMASCRIPT5_STRICT
--source_map_location_mapping js
/|/static
/js
/,, <js/*>;
24 my $js = read_file
'static/js.js';
25 write_file
'static/js.js', '//# sourceMappingURL=/static/js.map', "\n", $js;
26 system 'cp', '-rp', 'js', 'static/';
29 $js .= read_file
$_ for <js
/*.js
>;
30 write_file
'static/js.js', JavaScript
::Minifier
::XS
::minify
$js;