开发者

Visual Studio Web Deployment project auto compress js and css

开发者 https://www.devze.com 2022-12-19 23:45 出处:网络
Is there a way to make the web deployment project automatically compress js and css files when building it? how can I au开发者_如何学编程tomate this process?You can accomplish that by adding an MSBuil

Is there a way to make the web deployment project automatically compress js and css files when building it? how can I au开发者_如何学编程tomate this process?


You can accomplish that by adding an MSBuild task to your web deployment project that would compress your JS and CSS for you. Here is an example using the YUI compressor.

You could also do something similar with other compression libraries by using the Exec MSBuild task to execute a command line compression tool.


If you are using a build server (Team Build or something else) you can probably find, or certainly build, a custom task to handle this.


Pithy is what we use.

http://github.com/clearwavebuild/Pithy/tree/2009.12.22.1000

Has nice preprocessor support, too. (dotlesscss)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号