views:

38

answers:

1

Is there any software package/library that will produce a consolidated, minified JavaScript file for a production environment, while leaving the original files/references as-is in a development environment (so developers can work independently)?

JAWR does this (and more) for a Java/Groovy environment, but I haven't seen anything like it for the Microsoft .NET/IIS7 stack. Any pointers would be helpful. Thanks!

+1  A: 

We use YUICompressor to minify our Javscript (and CSS) and it works well.

However, we've had to write our own HttpHandler to decide whether to minify or not on the fly, depending on a config setting (but it could equally be on whether it was a DEBUG or RELEASE build).

In fact, we cache the file once minified (or not), so we don't have to do the same process on every request.

Rob Levine