Saturday 21 June 2008

Compressing Javascript files in netbeans 6.1

After reading the ant manual and contemplating this further I couldnt help thinking that someone might have already built an ant task to do this.

A quick google search yielded several interesting results:-

  • http://blog.tremend.ro/2006/10/25/ant-task-for-javascript-compression/
  • http://code.google.com/p/jsmin-ant-task/
  • http://javaflight.blogspot.com/2008/01/introducing-yui-compressor-ant-task.html

According to YUI Compressor pages, it is JavaScript minifier designed to be 100% safe and yield a higher compression ratio than most other tools including JSMin.

I am going to have a go at modifying an ant task to use the YUI Compressor and add it to a test web app build script in netbeans.

There are step by step instructions on how to create the ant script on slideshare here.

1 comment:

Anonymous said...

Great article as for me. I'd like to read something more concerning this topic.
BTW check the design I've made myself Overnight escorts