]> iEval git - gruntmaster-page.git/commitdiff
Merge branch 'master' into newmc
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 8 Mar 2015 10:17:15 +0000 (12:17 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 8 Mar 2015 10:17:15 +0000 (12:17 +0200)
Conflicts:
Makefile.PL
make_static.PL

1  2 
Makefile.PL
make_static.PL

diff --cc Makefile.PL
index c6d91a7941b776c7dff59e561878c6654affd84d,021ffdb4b64c3f5d11be11c3229c13deea10c95a..2b025b150581082049e9a4feb1d00aa7673a47c7
@@@ -10,7 -10,7 +10,7 @@@ WriteMakefile
        LICENSE           => 'AGPL_3',
        SIGN              => 1,
        clean             => {
-               FILES => 'static/css/ static/js.js css/logos.css static/logos.png'
 -              FILES => 'static/css/ static/js.js static/js.map static/js/'
++              FILES => 'static/css/ static/js.js css/logos.css static/logos.png static/js.map static/js/'
        },
        BUILD_REQUIRES    => {
                qw/CSS::Minifier::XS          0
diff --cc make_static.PL
index 5594f75d81b12b19132918f1f06e4ef05b84a90d,fe06da94e4a10cadfca343d5fc8b06fa05e9a070..01c61253138a804084ec2007469fa27b42ce884e
@@@ -39,27 -19,13 +39,34 @@@ for (<css/themes/*>) 
        write_file "static/css/$theme.css", CSS::Minifier::XS::minify $css;
  }
  
- my $js;
- $js .= read_file $_ for <js/*.js>;
- write_file 'static/js.js', JavaScript::Minifier::XS::minify $js;
+ if (-f 'compiler.jar') {
+       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/*>;
+       my $js = read_file 'static/js.js';
+       write_file 'static/js.js', '//# sourceMappingURL=/static/js.map', "\n", $js;
+       system 'cp', '-rp', 'js', 'static/';
+ } else {
+       my $js;
+       $js .= read_file $_ for <js/*.js>;
+       write_file 'static/js.js', JavaScript::Minifier::XS::minify $js;
+ }
 +
 +package
 +  Local::CSS::SpriteMaker;
 +
 +use parent qw/CSS::SpriteMaker/;
 +
 +sub _get_stylesheet_string {
 +      my $self = shift;
 +      my @ret = split "\n", $self->SUPER::_get_stylesheet_string(@_);
 +      shift @ret;
 +      @ret = sort @ret;
 +      unshift @ret, <<EOF;
 +a.logo {
 +      background-image: url("https://static.mindcoding.ro/static/logos.png");
 +      background-repeat: no-repeat;
 +      display: inline-block;
 +      vertical-align: middle;
 +}
 +EOF
 +      join "\n", @ret;
 +}
This page took 0.019984 seconds and 4 git commands to generate.