如何将 SquishIt 与不是有效虚拟路径的源一起使用
我想将本地网络中各种来源的一大堆东西压缩在一起 当我运行以下代码时,出现错误“http://cdn.mydomain.org/ajax/libs/jquery/1.5.1/jquery.js”不是有效的虚拟路径,这很公平,因为它不是” SquishIt 或任何其他“squisher”中是否
@MvcHtmlString.Create(
SquishIt.Framework.Bundle.JavaScript()
.Add("http://cdn.mydomain.org/ajax/libs/jquery/1.5.1/jquery.js")
.Add("~/Scripts/MyTrivialPlugin.js")
.ForceRelease()
.Render("~/Scripts/combined_#.js"))
有一个选项可以采用 uri 作为参数?
I want to squish a whole bunch of stuff together from various sources around my local network
When I run the following code I get the error 'http://cdn.mydomain.org/ajax/libs/jquery/1.5.1/jquery.js' is not a valid virtual path ehich is fair enough, because it isn't
@MvcHtmlString.Create(
SquishIt.Framework.Bundle.JavaScript()
.Add("http://cdn.mydomain.org/ajax/libs/jquery/1.5.1/jquery.js")
.Add("~/Scripts/MyTrivialPlugin.js")
.ForceRelease()
.Render("~/Scripts/combined_#.js"))
Is there an option in SquishIt or any other 'squisher' that will take uri's for arguments?
如果您尝试使用远程资源,则可以使用 AddRemote,它需要以下内容:调试时的 localPath 和发布时的 remotePath。当您强制发布时,它将始终使用您的remotePath。
If you're trying to use a remote resource there is AddRemote, which expects the following, a localPath when debugging and a remotePath when in release. As you are forcing release, it'll always use your remotePath.