You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
could be it is a combination of issues when using magic-min v3.0.4:
it always creates a new minified file, even when the source js files have not been modified, see log and timestamps
I need to explicitly add the minified output file to the exclude array, otherwise it will be included in the merge process (note the leading ./ that is needed to exclude the file ): $m = new Minifier(array("gzip"=>false,'closure'=>true, 'advanced_optimizations'=>true )); $m->merge( 'js/moves.min.js', './js', 'js', array('./js/moves.min.js') );
related: I have closure-compiler installed locally, is it possible to use that one instead of the API?
related: when I use the local closure-compiler (built: 2015/06/27 10:54), I get a smaller file than the one created by the Minifier class. I used: sudo closure-compiler --compilation_level ADVANCED_OPTIMIZATIONS --js moves.js --js movesCalendar.js --js movesDetails.js --js movesMap.js --js_output_file moves.min.js
-rw-r--r-- 1 _www _www 18490 Jul 16 14:35 moves.min.js
So 18490 instead of 24593 bytes.
log
(index):439 Minifier Log : echo: 1
(index):440 Minifier Log : encode:
(index):441 Minifier Log : timer: 1
(index):442 Minifier Log : gzip:
(index):443 Minifier Log : closure: 1
(index):444 Minifier Log : remove_comments: 1
(index):445 Minifier Log : hashed_filenames:
(index):446 Minifier Log : output_log:
(index):447 Minifier Log : force_rebuild: (index):448 Minifier Log: New File Flagged : Flagged for update by ./js/moves.js (index):449 Minifier Log: New File Flagged : Flagged for update by ./js/movesCalendar.js (index):450 Minifier Log: New File Flagged : Flagged for update by ./js/movesDetails.js (index):451 Minifier Log: New File Flagged : Flagged for update by ./js/movesMap.js
(index):452 Minifier Log: Creating new : js/moves.min.js exists but flagged for new
(index):453 Minifier note : Writing new file to js
(index):454 Minifier Log: New file : Successfully created js/moves.min.js
(index):455 Minifier Log: timer : MagicMin processed and loaded in 3.1951620578766 seconds
return true and set $this->create_new = true;.
The stylesheet line <link rel="stylesheet" href="<?php $minified->merge( 'assets/style.css', 'assets/css', 'css' ); ?>" /> is always re-generated.
could be it is a combination of issues when using magic-min v3.0.4:
it always creates a new minified file, even when the source js files have not been modified, see log and timestamps
I need to explicitly add the minified output file to the exclude array, otherwise it will be included in the merge process (note the leading ./ that is needed to exclude the file ):
$m = new Minifier(array("gzip"=>false,'closure'=>true, 'advanced_optimizations'=>true ));
$m->merge( 'js/moves.min.js', './js', 'js', array('./js/moves.min.js') );
related: I have closure-compiler installed locally, is it possible to use that one instead of the API?
related: when I use the local closure-compiler (built: 2015/06/27 10:54), I get a smaller file than the one created by the Minifier class. I used:
sudo closure-compiler --compilation_level ADVANCED_OPTIMIZATIONS --js moves.js --js movesCalendar.js --js movesDetails.js --js movesMap.js --js_output_file moves.min.js
-rw-r--r-- 1 _www _www 18490 Jul 16 14:35 moves.min.js
So 18490 instead of 24593 bytes.
log
(index):439 Minifier Log : echo: 1
(index):440 Minifier Log : encode:
(index):441 Minifier Log : timer: 1
(index):442 Minifier Log : gzip:
(index):443 Minifier Log : closure: 1
(index):444 Minifier Log : remove_comments: 1
(index):445 Minifier Log : hashed_filenames:
(index):446 Minifier Log : output_log:
(index):447 Minifier Log : force_rebuild:
(index):448 Minifier Log: New File Flagged : Flagged for update by ./js/moves.js
(index):449 Minifier Log: New File Flagged : Flagged for update by ./js/movesCalendar.js
(index):450 Minifier Log: New File Flagged : Flagged for update by ./js/movesDetails.js
(index):451 Minifier Log: New File Flagged : Flagged for update by ./js/movesMap.js
(index):452 Minifier Log: Creating new : js/moves.min.js exists but flagged for new
(index):453 Minifier note : Writing new file to js
(index):454 Minifier Log: New file : Successfully created js/moves.min.js
(index):455 Minifier Log: timer : MagicMin processed and loaded in 3.1951620578766 seconds
file timetamps
-rw-r--r-- 1 wvk _www 9123 Jul 13 17:54 moves.js
-rw-r--r-- 1 wvk _www 2861 Jul 13 18:56 movesCalendar.js
-rw-r--r-- 1 wvk _www 22618 Jul 13 19:00 movesMap.js
-rw-r--r-- 1 wvk _www 23159 Jul 15 13:24 movesDetails.js
-rw-r--r-- 1 _www _www 24593 Jul 16 14:21 moves.min.js
The text was updated successfully, but these errors were encountered: