c3js / c3

:bar_chart: A D3-based reusable chart library
http://c3js.org
MIT License
9.33k stars 1.39k forks source link

Syntax Issue with some packer/minimizers #2731

Open X25guru opened 4 years ago

X25guru commented 4 years ago

v0.7.11 (and at least back to 0.6.7)

This line:

if ($$.isDonutType(d.data)) ;

will cause an error with some packer/minimizers.

if ($$.isDonutType(d.data)){} ;

fixes the problem.

kt3k commented 4 years ago

Which minifying tool do you use?

X25guru commented 4 years ago

this problem was detected with packer

kt3k commented 4 years ago

Do you mean this packer? https://github.com/evanw/packer

If so, I think you shouldn't use this package because it's not maintained. There are better alternatives like uglify-js or terser.

X25guru commented 4 years ago

I use the php version; it's been working for 15 years so why do I care about a maintainer? And What good is a maintainer if they give advice instead of fixing their code? One maintainer refused to fix his lines without semi-colons because he said they're not required. And your "advice" is to switch to another product. I'm just informing you that out of 15 js scripts that I combine and minify, only yours causes a problem. If you don't care, fine. I dont need your advice.