Thursday, August 21, 2008

Javascript/CSS/HTML Compiler in Ruby

I have backed some pretty tasteful cookie in here!

Met FrontCompiler!

It's a collection of scripts which allows you to compact your JavasScript, CSS and HTML code to reduce the loading time, and it can be used with Rails/Merb/Whatever.

NOTE: in test of compacting the Prototype library the script beats famous YUI compiler on about 1 KByte.

Enjoy! 8)

3 comments:

Dave said...

What does your compressor do different than Yahoo's YUI compressor?

Nikolay V. Nemshilov aka St. said...

dave, actually i don't know how YUI works. As I understand it uses some Mozilla engine to analize the code.

My version is simplier, it just a bunch of regexps.

morhekil said...

dave, I'd like to add that it's native Ruby code that makes it a breeze to use with Rails applications (while deploying to production, etc), and I've seen that patches to make it a Rails plugin already came up on github making it even simpler.