建立ASP.net在缩小内嵌的JavaScript? [英] Minify inline javascript during build for ASP.net?

查看:136
本文介绍了建立ASP.net在缩小内嵌的JavaScript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有包括具体到该页面超过50+行JavaScript ASP.net页面屈指可数。我们希望在我们的CruiseControl构建过程来缩小的JavaScript。

We have a handful of ASP.net pages that include more than 50+ lines of javascript specific to that page. We'd like to minify that javascript during our CruiseControl build process.

我们已经使用了YUI的COM pressor对COM preSS我们充分的JavaScript和CSS文件。但是,我们无法弄清楚如何做内联JavaScript。

We already use the YUI Compressor to compress our full javascript and css files. But we can't figure out how to do the Inline javascript.

是否有一个MSBuild任务通过asp.net页面旋转和压缩JavaScript?

Is there an MSBuild task to spin through asp.net pages and minify the javascript?

推荐答案

有一个有趣的博客和的NuGet 包叫做 undleMinifyInlineJsCss 来处理这个问题

There is an interesting blog and NuGet package called undleMinifyInlineJsCss to handle this

<一个href=\"http://weblogs.asp.net/imranbaloch/archive/2012/07/25/bundling-and-minifying-inline-css-and-js.aspx\" rel=\"nofollow\">http://weblogs.asp.net/imranbaloch/archive/2012/07/25/bundling-and-minifying-inline-css-and-js.aspx

这篇关于建立ASP.net在缩小内嵌的JavaScript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆