There is already a tool which has all the features you need to help web developers:
http://code.google.com/p/wro4j/wiki/FeaturesIt can be used during development, as a runtime or buildtime solution. Also it can be used as a command line tool. It supports almost all known processors (less, sass, coffee, etc) and allows static code analysis with jshint, jslint or csslint.