CSS/JS Compression in Eclipse with the Spket IDE

When developing websites or hybrid mobile apps, it a good practice to compress your JavaScript and CSS stylesheets to reduce the download and loading effort / time. The Yahoo User Interface project YUI provides the YUI compressor, a good infrastructure to perform such a compression and obfuscation as well (if needed).

If you develop your application/website using Eclipse, there is no support provided by Yahoo or the Eclipse web development platform. But, the Spket provides a good extension to fill this gap.

The Spket project has developed an environment for text editor development called AgPad (“Another General Purpose Text Editor”). Based on this editor, they have build the Spket Studio providing editors for JavaScript, XML,… AND an integration for the YUI compressor infrastructure.

Their website: http://www.spket.com/ does not mention this feature, but it is smoothly integrated and very intuitive to be used.

Just right-click your css file to open the context menu and select YUI Compressor…

A Wizard is opened to browse for the target file. You can make some additional configuration and clicking OK, the minified file will be produced. Notice: You can select multiple source files and compress them into single one as well.

image image

 

For JavaScript files, it works the same way when performing those steps on a JavaScript file.

 

Please note: The Spket studio is free for non-commercial use. To support the project, the commercial use requires a usage fee of 29$ for a single user which is is a fair price.

Unfortunately, there have been no updates nor any other activity for some time. Hopefully, this will change some time again.

Leave a Comment