

Show HN: JSMin fork (allows Bootstrap's idiom) - palish
https://github.com/shawnpresser/JSMin/commit/d2d03488ef93f769498d9cc0c2a4feea0b04e04f?

======
palish
Hey all,

Mr. Crockford has recently refused to fix JSMin
(<https://github.com/twitter/bootstrap/issues/3057>).

Thus, I've fixed it. You can get the updated code from
<https://github.com/shawnpresser/JSMin/blob/master/jsmin.c>

The fix was simple. It simply scans for "newline, optional whitespace,
exclamation point" and replaces the newline with a semicolon.

I've given special attention to safety. This code works exactly as JSMin did,
except it implements the aforementioned semicolon substitution, thus
supporting the Javascript idiom:

    
    
      a()
      !b && c()
    

I hope this proves useful to someone (possibly the authors of Bootstrap). It
was a fun project.

~~~
Bootvis
I like the doing instead of all the talking. Kudos for this.

------
MrEnigma
Well that discussion is pretty crazy and very polarized.

JSMin guy thinks fixing it is stupid, and the bootstrap guy says that since it
works in browsers it should work in JSMin.

So they've reached an impasse. Unfortunately emotions and strong words were
used right away which polarizes the conversation.

Being completely pragmatic about it, it seems that bootstrap should probably
change, instead of JSMin. But I don't think either will so both sides lose,
and potentially make their tools available to a smaller audience.

------
tszming
Please send a pull request to Crockford :)

