From bc5cbfc79e7c80f4b4d2b8f528d6ab577430d4a2 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Mon, 14 Oct 2013 13:23:50 +0300 Subject: [PATCH] RenderRequireJsSetup toggle release mode based on IsDebuggingEnabled --- RequireJsNet.Docs/Views/Shared/_Layout.cshtml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/RequireJsNet.Docs/Views/Shared/_Layout.cshtml b/RequireJsNet.Docs/Views/Shared/_Layout.cshtml index cc3b063..4d0b160 100644 --- a/RequireJsNet.Docs/Views/Shared/_Layout.cshtml +++ b/RequireJsNet.Docs/Views/Shared/_Layout.cshtml @@ -48,6 +48,18 @@ - @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")) + } +