Cookie Notice

As far as I know, and as far as I remember, nothing in this page does anything with Cookies.

2012/06/04

My Current Project

Image by LiminaMike
This relates to the Yak Shaving I mentioned recently.

I'm working on developing something in an MVC, and the specifics of it involve Javascript to handle the UI of it. As I'm expecting to have lots of unrelated Javascript libraries, I'd rather have one call for my stuff than several, so I'm working on a tool that

  • Allows me to write and test code both in individual library context and related to the whole code base
  • Automates the steps to get to combined, minified and gzipped code, as suggested in Steve Souders' High Performance Web Sites.
I have ugly code that I want to refactor — specifically, I have to programs (one for the minification and one for the test generation) when they could be easily and preferably turned into one — but it is functional. Except maybe not.

I think I'll have to get the admin to change the website config to announce gzipped files before I can get the test code going. I'm content to have that wait.

The bigger problem is minification. I found a Perl implementation of a Javascript packer called Packer, and my thought was "Yay! No more worrying about getting YUI-Compressor to work!" But, so far, it seems to be introducing errors. A working combined Javascript library fails to work when minified. So, I either look at Packer's internals or YUI-Compressor's internals.

Or, as I'm going to do, figure that combining is good enough for now, back burner the rest, and stop shaving this yak.

2 comments:

  1. FYI, there are some JavaScript minifiers available on CPAN. Not sure if you'd seen them, but your post didn't lead me to believe that you'd looked on CPAN for them.

    (disclaimer: I'm the author of JavaScript::Minifier::XS)

    ReplyDelete