Question

I need to pack all my js, but need to edit it going into source control.

is there a nice easy plugin for ccnet, or nant, that will allow me to pack my js, and store them in the same files on the way out to production.

Not really looking for file combining, just minifying each file.

Was it helpful?

Solution

Here is the best answer I have found. It calls the YUI version of minify and just uses plain old Nant to do so and replace the existing js files with the minifyed ones.

http://codeclimber.net.nz/archive/2007/08/22/How-to-use-YUI-JS-Compressor-inside-a-NAnt-build.aspx

OTHER TIPS

I built my own Nant task off of this one.

http://www.nabble.com/Re:-All-.js-files-into-1-p19593677.html

I use copy concatenation and the YUI Compressor in a post build script. Old-school batch file style.

The compressor works like a charm. My .NET website application uses the website deployment project and is continuously built by TeamCity. A bit hackish perhaps, but it works.

I have written my own custom tool for this, its part of the runtime but could be easily changed to work in the continous integration process. It uses google's closure compiler. Check it out:

http://www.picnet.com.au/blogs/Guido/post/2009/12/10/Javascript-runtime-compilation-using-AspNet-and-Googles-Closure-Compiler.aspx

Thanks

Guido

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top