diff --git a/SquishItAspNetMvcTest/Controllers/AutoBundlingController.cs b/SquishItAspNetMvcTest/Controllers/AutoBundlingController.cs index 4d112ab..5f3a640 100644 --- a/SquishItAspNetMvcTest/Controllers/AutoBundlingController.cs +++ b/SquishItAspNetMvcTest/Controllers/AutoBundlingController.cs @@ -9,6 +9,11 @@ public ActionResult Javascript() return View(); } + public ActionResult JavascriptSection() + { + return View(); + } + public ActionResult Css() { return View(); diff --git a/SquishItAspNetMvcTest/SquishItAspNetMvcTest.csproj b/SquishItAspNetMvcTest/SquishItAspNetMvcTest.csproj index 9df42af..9e8ab41 100644 --- a/SquishItAspNetMvcTest/SquishItAspNetMvcTest.csproj +++ b/SquishItAspNetMvcTest/SquishItAspNetMvcTest.csproj @@ -165,6 +165,8 @@ + + diff --git a/SquishItAspNetMvcTest/Views/AutoBundling/JavascriptSection.cshtml b/SquishItAspNetMvcTest/Views/AutoBundling/JavascriptSection.cshtml new file mode 100644 index 0000000..afa768b --- /dev/null +++ b/SquishItAspNetMvcTest/Views/AutoBundling/JavascriptSection.cshtml @@ -0,0 +1,8 @@ +@using SquishIt.Mvc +@{ + ViewBag.Title = "Auto-Bundle Js"; + Layout = "~/Views/Shared/_LayoutSection.cshtml"; +} + + @{ Html.AddScriptResources("/assets/js/jquery_1.7.2.js", "/assets/js/minifyjs_test.js"); } +} diff --git a/SquishItAspNetMvcTest/Views/Shared/_LayoutSection.cshtml b/SquishItAspNetMvcTest/Views/Shared/_LayoutSection.cshtml new file mode 100644 index 0000000..89e7c44 --- /dev/null +++ b/SquishItAspNetMvcTest/Views/Shared/_LayoutSection.cshtml @@ -0,0 +1,15 @@ +@using SquishIt.Mvc + + + + + @ViewBag.Title + @RenderSection("Styles", false) + + + + @Html.ScriptResourceLinks() + @RenderBody() + @RenderSection("JavaScript", false) + + diff --git a/SquishItAspNetMvcTest/assets/js/minifyjs_test.js b/SquishItAspNetMvcTest/assets/js/minifyjs_test.js index e06b1ce..43471d6 100644 --- a/SquishItAspNetMvcTest/assets/js/minifyjs_test.js +++ b/SquishItAspNetMvcTest/assets/js/minifyjs_test.js @@ -1,3 +1,4 @@ $(function () { $("#js-test-container").html("This text was placed here by javascript. If you see this, the test completed successfully."); + $("#js-test-section-container").html("This text was placed here by javascript. If you see this, the test completed successfully."); }); \ No newline at end of file