I always use mini versions of 3 party JS if I donβt need to delve into this ... In any case, you could write an html helper that inserts the correct script name based on some configuration (maybe debug vs release). ..
You would have something like:
<%= Html.IncludeJQuery() %>
or if all your scripts comply with the same convention (.min.js for the mini version), then the helper that inserts '.min' into the script you pass is in the release
<%= Html.IncludeCorrectVersionOfScript("jquery-1.4.2.js") %>
Update:
Html- - Mvc HtmlHelper, ActionLink, BeginForm, EditorFor .. ( albiet static), Html.MyMethod.... :
public static class ScriptIncludeHelper
{
public static MvcHtmlString IncludeCorrectVersionOfScript(this HtmlHelper html, string script)
{
if (!html.ViewContext.HttpContext.IsDebuggingEnabled)
script = script.Replace(".js", ".min.js");
var tag = string.Format("<script type=\"text/javascript\" src=\"{0}\"></script>", script);
return MvcHtmlString.Create(tag);
}
}
, ( , etcetc.etc.)
IsDebuggingEnabled web.config , , ...