Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yuicompressor error, not sure what is wrong?

Very confused here, trying out the yuicompressor on a simple javascript file.

My js file looks like:

function splitText(text)
{
    return text.split('-')[1];
}

The error is:

[INFO] Using charset Cp1252

[Error] 1:20:illegal character [Error] 1:20:syntax error [Error] 1:40:illegal character [Error] 1:49:missing ; before statement [Error] 1:50:illegal character .. .. [Error] 7:3:missing | in compound statement [error] 1:0:compilation produced 38 syntax errors ...

Can someone please explain to me what is wrong?

like image 237
mrblah Avatar asked Feb 10 '26 21:02

mrblah


1 Answers

Your encoding of the actual file YUICompressor is acting on is the issue. Open the file in notepad++ and change to ANSI & it should work.

[http://extjs.com/forum/showthread.php?t=27732][1]

like image 194
Tim Boland Avatar answered Feb 13 '26 12:02

Tim Boland



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!