I looked online for an ant library that could accomplish this and came across one that was almost exactly what I was looking for. It could minify JS files using YUI Compressor but lacked a couple of features I required. So, I went through the library’s source code and added the following features
Minification option for CSS files
Option to delete original source files after minification
Since other people might want to use these additional features, I’ve made the modified library open source on GitHub:
The README file describes the available options and how to use them. There’s also an example folder with a working ant project for JS/CSS minification. My code is based on the yui-compressor-ant-task hosted on google code.
HTML is case-insensitive and therefore the casing of event handler names in your HTML documents is irrelevant. E.g. you can use onclick, ONCLICK, onClick or event oNcLiCk for your event handler name. However, XHTML is not so liberal and stipulates that all event handler names should be lowercase (e.g. onclick=”…”). Therefore, to make your HTML pages XHTML compliant, always use lowercase event handler names.