Packer 3.0 and issues with our framework (fixed!)

So over at Ajaxian today they have a post on Dean Edward’s latest update for his excellent packer javascript compression tool:

Dean Edwards has released Packer v3.0, one of the top utilities to squeeze your JavaScript like a lemon.

  • respects Microsoft conditional comments
  • new option to shrink variable and argument identifiers
  • removed the special chars feature

    (except the ;;; feature which people seem to like)
  • some bug fixes:
    • packer no longer closes spaces between the +/- operators so code like this is safe: c = a++ +b;
    • the throw”error”} bug that affected Safari (this is a Safari bug really but packer gets around it)
    • the __proto__ bug for Mozilla browsers (this only affected the online version of packer)
    • a minor parsing bug affecting the detection of regular expressions
  • simplified the user interface

Update:

The problems I outline below are fixed. Thanks Dean!

Unfortunately, I ran one of our libraries through it and found two issues that we’ll need to address before we can use it (luckly, I have a local copy of the previous version of the Packer…):

  • ‘http://…’ breaks. Your packer wants this to be double quotes (”http://…”).
  • /*comment*//*followed by another comment*/ breaks. This happens in our code because we concatenate several files together and each file starts with comments and ends with comments.

I emailed Dean. Maybe he’ll have a fix. If not, we’ll have to figure something out or use the old one.

One Response to “Packer 3.0 and issues with our framework (fixed!)”

  1. Dean Edwards Says:

    Hi Aaron, I didn’t receive your email. Can you send it again please?

Leave a Reply

You must be logged in to post a comment.