1

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?

Curtis
  • 98,395
  • 62
  • 265
  • 345

3 Answers3

1

Have you looked at the Web Deployment Tool Visual Studio 2010 - WDP or Publish for automated deployment?

Community
  • 1
  • 1
Matty F
  • 3,733
  • 2
  • 28
  • 46
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
  • 507
  • 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,149
  • 4
  • 43
  • 55