Is there a way, that when I Publish/Compile my web application in Visual Studio 2010 that any javascript files in the application can be automatically compressed?
Asked
Active
Viewed 705 times
1
-
You can use a Post Build action with Minifiers running over your scripts. – Furqan Hameedi Mar 16 '11 at 11:08
3 Answers
1
Have you looked at the Web Deployment Tool Visual Studio 2010 - WDP or Publish for automated deployment?
0
I'll tell my experience and maybe it serves to you. When I build a web app, a consider use some content compressor, like SquishIt. It has behaviors like compress when in production and cache files. Hope it helps.

marcoaoteixeira
- 505
- 2
- 14
0
I wrote a nuget package to do this you might like to try ...
http://nuget.org/List/Packages/antix-nibbler
Uses YUI Compressor for .Net http://yuicompressor.codeplex.com/ for JS and CSS and PNGOUT.EXE http://advsys.net/ken/utils.htm for PNG compression
Doesn't combine the files into one like squishit does, but is easy to add to your app through nuget and needs no additional coding

Anthony Johnston
- 9,405
- 4
- 46
- 57