Question

I am facing issue related to YUI compressor...its like during minification it does not throw error or warning if trailing comma is found like in json or config properties in EXT JS 3.4

So,,Can YUI throw such warning or I have to use some other compressor that can help me in this issue of trailing comma.I am using EXT JS and need to minify it. Plz help

Was it helpful?

Solution

That is not the purpose of the compressor. A compressor will show error messages when the source cannot be compressed due to fatal syntax errors. A trailing comma is not a fatal error, it is, indeed, permitted by JS syntax, the problem is how browsers implement it. To warn you about such dubious interpretations, you have to use a syntax checker such as JSLint or JSHint.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top