meenie / munee

Munee: Standalone PHP 5.3 Asset Optimisation & Manipulation
https://munee.herokuapp.com/
MIT License
833 stars 92 forks source link

Javascript Minify : problem with comments #38

Closed WilliamVercken closed 9 years ago

WilliamVercken commented 10 years ago

Hi ! I found an issue with the minify command when there is a comment at the bottom of js files.

/media/js/test1.js

//TEST1
alert('TEST 1');
//END TEST1

/media/js/test2.js

//TEST2
alert('TEST 2');
//END TEST2

Combine without Minify : OK

<script type="text/javascript" src="/munee.php?files=/media/js/test1.js,/media/js/test2.js" defer></script>
//TEST1
alert('TEST 1');
//END TEST1
//TEST2
alert('TEST 2');
//END TEST2

Combine & Minify : NOT OK

<script type="text/javascript" src="/munee.php?files=/media/js/test1.js,/media/js/test2.js&minify=true" defer></script>
alert('TEST 1');END TEST1

alert('TEST 2');END TEST2
meenie commented 9 years ago

I just tried this and had no issues. I've recently updated the jsmin library to it's latest version. It could have been an issue in the previous version. Thanks for the report!