soyturk / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

JSMin fails on jQuery UI (1.8.1) preminified with Google Closure Compiler #175

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Minify version: 2.1.3
PHP version: 5.2.13

What steps will reproduce the problem?
1. Download latest version of jQuery UI (1.8.1)
http://jquery-ui.googlecode.com/files/jquery-ui-1.8.1.zip which uses Google
Closure Compiler (instead of YUI Compressor) 
2. Minify the ui/jquery-ui.js (passed with some example from the packed)
3. Minify the ui/minified/jquery-ui.min.js (failed)

Expected output:
jquery-ui.js and jquery-ui.min.js, both files should work with minify

Actual output:
jquery-ui.min.js doesn't work (but older versions compressed by YUI
Compressor works properly), I checked (for sure) and this file works
properly with &debug=1

Did any unit tests FAIL? 
no

Original issue reported on code.google.com by SmallPar...@gmail.com on 4 May 2010 at 4:19

GoogleCodeExporter commented 9 years ago
Short term solution is to not minify that file:
http://code.google.com/p/minify/wiki/CustomSource#Example:_Specify_a_different_m
inifier_or_none_at_all

Does JSMin actually throw an exception or just mangle the output? Can you find 
where
the problem is?

Original comment by mrclay....@gmail.com on 4 May 2010 at 4:49

GoogleCodeExporter commented 9 years ago
Result code :

Erreur : invalid increment operand
Fichier Source : http://localhost/project/oktMin/?g=js_admin
Ligne : 59, Colonne : 66
Code Source :
if(!a.id)a.id="dp"+++this.uuid;var
-------------------^

Original comment by for...@gmail.com on 5 May 2010 at 7:20

GoogleCodeExporter commented 9 years ago
The solution is as follows.

Find all occurences of "+ ++" inside the jquery-ui.min file and put () around 
the ++
part.

example:
OLD: "ui-tabs-"+ ++u
NEW: "ui-tabs-"+ (++u)

This isn't a fix for why JSMin is breaking, but it does solve the issue. This 
ticket
is related http://code.google.com/p/minify/issues/detail?id=144

Original comment by robert.s...@gmail.com on 5 May 2010 at 7:55

GoogleCodeExporter commented 9 years ago

Original comment by mrclay....@gmail.com on 8 May 2010 at 7:36