- Download the YUI Compression Lib making sure you abide by the terms of the licence agreement.
- Download the YUIAnt.jar , this is the ant task required, see this page for information.
For web applications that you want to build with compressed js/css files add the folloing xml to the build.xml for the project, overiding the "-pre-dist" ant target which is not currently configured by default in netbeans.
This will compress and copy the js and css files to the build directory before the war file is built and will thus be included in your war file.
<yuicompress linebreak="300" warn="false" munge="no"
<include name="**/*.js" />
<include name="**/*.css" />
<echo level="info" message="Compression Complete" />
Note there is a line in my example with an "exclude" for my ext-2.1 directory, the files there are already compressed so i have excluded them, just add/remove to suit your application.
The payload without compression on my current project is 880kb after compression 620kb, and has shaved a couple of seconds off the browser load time too.
All we need now is for someone to code a netbeans plugin that configures this all for us and makes it configurable from a wizard maybe, any takers ?
I have also stumbled upon this excellent nb6.1 plug-in for pl/sql editing be sure to check it out if you want to edit pl/sql from within netbeans.