@{
ViewBag.Title = "Home Page";
SquishIt.JavaScript.Add(
Url.Content("~/Scripts/jquery_ui.js"),
Url.Content("~/Scripts/jquery_1.4.4.js")
);
}
@SquishIt.JavaScript.Render(Url.Content("~/Scripts/min.js"))
It shows like this:
<script type="text/javascript" src="/Scripts/jquery_ui.js"></script>`
<script type="text/javascript" src="/Scripts/jquery_1.4.4.js">&l开发者_开发百科t;/script>`
Where is "min.js"?
The two js files are not combine into one js named min.js?
Thanks!
To help with debugging, SquishIt does not do anything to the files when in debug mode.
However, you can add a .ForceRelease()
call before the .Render(...)
call to force it to combine the files as if it's in release mode:
@SquishIt.JavaScript.ForceRelease().Render(Url.Content("~/Scripts/min.js"))
Do you have debug="true" in web.config? It must be set to "false" for squishit to work: http://www.codethinked.com/squishit-the-friendly-aspnet-javascript-and-css-squisher
精彩评论