Skip to content

Commit

Permalink
RenderRequireJsSetup toggle release mode based on IsDebuggingEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprodan committed Oct 14, 2013
1 parent fb0c100 commit bc5cbfc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion RequireJsNet.Docs/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@
</div>
</footer>

@Html.RenderRequireJsSetup(Url.Content("~/Scripts"), Url.Content("~/Scripts/require.js"), Server.MapPath("~/RequireJS.release.config"))
@if (HttpContext.Current.IsDebuggingEnabled)
{
@Html.RenderRequireJsSetup(Url.Content("~/Scripts"),
Url.Content("~/Scripts/require.js"),
Server.MapPath("~/RequireJS.config"))
}
else
{
@Html.RenderRequireJsSetup(Url.Content("~/Scripts"),
Url.Content("~/Scripts/require.js"),
Server.MapPath("~/RequireJS.release.config"))
}

</body>
</html>

0 comments on commit bc5cbfc

Please sign in to comment.