This is a migrated thread and some comments may be shown as answers.

Eclipse .min.js Files Multiple Syntax Errors

1 Answer 299 Views
Application
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 29 Aug 2012, 05:18 PM
Hi,

I'm looking to use Kendo UI with PhoneGap to create a mobile app. I have PhoneGap working fine but when I copy and paste KendoUI's "styles" and "js" folders into the assets folder of the Eclipse project several .min.js files throw syntax errors! I downloaded and used: "kendoui.trial.2012.2.710"

"Syntax error on token ",", ; expected kendo.all.min.js /KendoUI_BaseTemplate/assets/js line 8 JavaScript Problem"
"Syntax error on token "}", ; expected kendo.dataviz.min.js /KendoUI_BaseTemplate/assets/js line 8 JavaScript Problem"
etc...

In total there are 462 syntax errors where Eclipse expects a different symbol instead of the given symbol. Does this mean the files are corrupt or Eclipse is just being funny as usual? Is there a way to suppress the errors as the application won't compile until the errors are dealt with?

Any help would be great,
Tom

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 31 Aug 2012, 06:44 AM
Hello Thomas,

The kendo scripts distributed are minified and compressed in order to reduce their size. The minification also clears any new lines present in the scripts. This results in roughly 100 000 symbols on a single line. I am certain that this confuses Eclipse. 

I am not an Eclipse expert, but it seems that a similar problem occurs with jQuery itself. You can check this Stack Overflow thread for suggestions on how to resolve it. 

All the best,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Application
Asked by
Thomas
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or