-
27 Feb 2008 8:16 AM #1Ext User
- Join Date
- Oct 2007
- Posts
- 98
Yui Compressor, Obfuscation Errors
Yui Compressor, Obfuscation Errors
I've been trying to find an obfuscator for my JS files and am having some trouble with the ones I've tested. Specifically with Yuicompressor I receive syntax errors during obfuscation:
Can anything be derived from this error message? I have no clue as to what it's complaining about.Code:... yuicompressor-2.3.4.jar" "C:\obf tests\Copy of testpreobf1.js" [ERROR] 1:2:illegal character [ERROR] 1:2:syntax error [ERROR] 1:3:illegal character [ERROR] 1:0:Compilation produced 3 syntax errors. org.mozilla.javascript.EvaluatorException: Compilation produced 3 syntax errors. at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICom pressor.java:143) at org.mozilla.javascript.Parser.parse(Parser.java:402) at org.mozilla.javascript.Parser.parse(Parser.java:347) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScri ptCompressor.java:312) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScr iptCompressor.java:532) at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.ja va:120)
I ran the same JS code through JSLint and the only errors I received were nothing more than warnings such as line breaks and missing '{' for one-line if-statements.
Can anyone suggest a similar (perhaps free?) obfuscator/minifier that is a bit more flexible or at least a bit more detailed in its errors?
-
27 Feb 2008 8:23 AM #2
woah... YUICompressor's the best one i know of...
i've never seen those errors before btw.
try removing those spaces from your js file's filename for starters.
p.s. version 2.3.5 is already out. couple of bugfixes made it into this version.
p.s.s. if you could post a little snippet of that file i could run it through my yuicompressor and see what it turns up.
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
27 Feb 2008 8:27 AM #3Ext User
- Join Date
- Oct 2007
- Posts
- 98
I'm in a bit of disbelief. Found something called Javascript-Obfuscator from javascript-source and it worked flawlessly (has a price tag, but that's ok..). I wonder why J-O has no issues but YUI Compressor freaks out? I put the obfuscated code into my project and it runs perfectly. Went from 36k to 22k and that was at the default obfuscation settings (no variable name changes).
-
27 Feb 2008 8:41 AM #4
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
27 Feb 2008 8:45 AM #5
if i may be allowed one last post

@ferr, yuicompressor isn't exactly an obfuscator per se, but it sure as heck does a fantastic job of compressing code and checking for errors. be sure to drop a bug report @ the YUI sourceforge site for yuicompressor. i filed one bug and the author had it fixed within the week.
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
27 Feb 2008 12:00 PM #6Ext User
- Join Date
- Jul 2007
- Location
- Moscow
- Posts
- 29
-
27 Feb 2008 2:06 PM #7Ext User
- Join Date
- Oct 2007
- Posts
- 98

Reply With Quote
yntax error