views:

961

answers:

2

The ASP.NET team released the script combining feature in 3.5 SP1 as detailed here http://www.asp.net/Learn/3.5-SP1/video-296.aspx. Is there a similar feature already for the MVC framework? If not, is this in scope or is it possible to somehow leverage the webforms capability in MVC? I see this site uses a custom jquery.package.master which, I assume, they have rolled themselves (maybe into the build cycle, however it is not all minified therefore I think they have manually appended the scripts together rather than some automated minify & combine task). Would be interested in any ideas how to accomplish this in MVC but I dont want to begin rolling any of my own functionality in case I will be duplicating work in progress.

+4  A: 

Here's what I do, in case it's helpful.

In my postbuild I call a command line version of Dean Edwards's Packer. It combines the scripts and packs them for me.

For now though, I keep all of my stuff seperate and use a Helper method to include my scripts, and if the debug flag is not present it will include the packed versions, otherwise it includes the unpacked.

Jeff Sheldon
not sure I'd pack them but its a good idea (packers can cause issues) and its better to use min + gzip. If you start to gzip a packed file it ends up bigger much like a zip of a zip. Anyway I am now useing YUI as part of my TeamCity build process. You were on the right track.
redsquare
+1  A: 

Check this out - this seems like a really cool solution.

Slee