Monday, January 12th, 2009

YUI Compressor Online

Category: Utility, Yahoo!

Rodolphe Stoclin has created a simple Web wrapper on top of the YUI Compressor that let’s you throw up your JavaScript and get back a compressed version.

It uses jQuery to do the inline results and show you the compression rate.

Posted by Dion Almaer at 12:48 pm
14 Comments

++++-
4 rating from 38 votes

14 Comments »

Comments feed TrackBack URI

I’m still searching for “one button compressor” feature integrated directly into an IDE such as Aptana : select your .js files, click “compress” and tada!: you’ve got your .min.js
Wouldn’t it be cool?

Comment by frenchStudent — January 12, 2009

I should point out that there refresh-sf has the same sort of implementation, but can also accept straight text instead of a file upload. (and css minification too)

And it’s uglier. :) http://refresh-sf.com/yui/

Comment by PaulIrish — January 12, 2009

@frenchStudent: it does exist. it’s called jsLex. works nicely. and you can also do CSS.
.
.
http://www.rockstarapps.com/pmwiki/pmwiki.php?n=JsLex.JsLex

Comment by ajaxery — January 12, 2009

What I would find useful would be an application that allows you to specify a number of js files, that then concatenates them together and then minimises/obsfucates them.

Comment by bshenanigan — January 12, 2009

What is better is not ever having to actually compress a file manually. Build the step into your build process [Ant, NAnt, Maven, etc]. Your build can take the files and generate the compressed versions concatenated for you.

Comment by epascarello — January 12, 2009

If you’re using Java, try jawr: https://jawr.dev.java.net/
I have a hard time developing without it now. I’m so spoiled… Everything is bundled at startup. Better yet, there’s a debug mode that will explode the js and css bundles while you work.

Comment by rubyred — January 12, 2009

i’ve been using http://compressorrater.thruhere.net/ which combines YUI, Packer, JSMin, ShrinkSafe AND Gzip along with the compression ratios to see which ones are the smallest (Packer usually is the smallest, though the output frequently has syntax errors, YUI does it the best).

Comment by antimatter15 — January 12, 2009

I have YUI as a ‘tool’ in TextPad, mapped to ALT-C. when i’m ready to compress, I hit ALT-C and its done, straight from whatever .js file is currently in focus in TextPad. I have another ‘tool’ that uploads the file in focus to the correct folder on the correct FTP, right from TextPad. works great.

Comment by leptons — January 12, 2009

@antimatter15: which is smallest is one thing, but which offers best performance something entirely different. From what I’ve seen in the past the highest compression rates came at a cost of loading performance.

Comment by Joeri — January 13, 2009

I love the YUI compressor, but being a linux dork, I’d rather just stick to the command line java version. It’s way easier to implement into pake, rake and make tasks, thus doubling my productivity through automation.

Kudos to Rodolphe Stoclin for putting it up though.

Comment by slajax — January 13, 2009

You can use Dojo’s ShrinkSafe online at http://shrinksafe.dojotoolkit.org , it does more or less the same job as the YUI compressor

Comment by sos — January 13, 2009

GZip gets me about 4-1, YUI Compressor about 2-1. Combined really does get 8-1. That’s pretty cool.

Comment by JonathanLeech — January 13, 2009

I see this as a good one off tool not for regular use, as frenchStudent says we need a one button ide build tool.

It already exists its called Ant and integrates with netbeans and eclipse.

This is how I use automated minified javascript during the build process from my fav ide netbeans see http://nnbs.blogspot.com for the details.

Comment by hat27533 — January 13, 2009

@frenchStudent and @bshenanigan as @ajaxery mentioned the jsLex has the functionality you are looking for.

Simply select a set of files or even the tags in an HTML file and you can compress CSS, JavaScript or make Image Sprites.

Go to http://www.rockstarapps.com/pmwiki/pmwiki.php?n=JsLex.JsLex for more information.

Comment by digitalIchi — January 14, 2009

Leave a comment

You must be logged in to post a comment.