-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for JS assets versioning
resolves #13
- Loading branch information
1 parent
2ba3581
commit 1ddc98c
Showing
5 changed files
with
84 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,71 @@ | ||
@using RequireJS | ||
@using RequireJsNet.Docs.Helpers | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>@ViewBag.Title</title> | ||
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
|
||
<!--[if lt IE 9]> | ||
<script src="@Url.Content("~/Scripts/Lib/Vendor/HTML5/json2.js")" type="text/javascript"></script> | ||
<script src="@Url.Content("~/Scripts/Lib/Vendor/HTML5/html5shiv.js")"></script> | ||
<![endif]--> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>@ViewBag.Title</title> | ||
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
|
||
@Styles.Render("~/css") | ||
</head> | ||
<body> | ||
<header> | ||
<div class="content-wrapper"> | ||
<div class="float-left"> | ||
<p class="site-title">@Html.ActionLink("RequireJS for .NET", "Index", "Home")</p> | ||
</div> | ||
<div class="float-right"> | ||
<section id="login"> | ||
</section> | ||
<nav> | ||
<ul id="menu"> | ||
<li>@Html.ActionLink("Home", "Index", "Home")</li> | ||
<li>@Html.ActionLink("About", "About", "Home")</li> | ||
<li>@Html.ActionLink("Contact", "Contact", "Home")</li> | ||
</ul> | ||
</nav> | ||
</div> | ||
<!--[if lt IE 9]> | ||
<script src="@Url.Content("~/Scripts/Lib/Vendor/HTML5/json2.js")" type="text/javascript"></script> | ||
<script src="@Url.Content("~/Scripts/Lib/Vendor/HTML5/html5shiv.js")"></script> | ||
<![endif]--> | ||
@Styles.Render("~/css") | ||
</head> | ||
<body> | ||
<header> | ||
<div class="content-wrapper"> | ||
<div class="float-left"> | ||
<p class="site-title">@Html.ActionLink("RequireJS for .NET", "Index", "Home")</p> | ||
</div> | ||
<div class="float-right"> | ||
<section id="login"></section> | ||
<nav> | ||
<ul id="menu"> | ||
<li>@Html.ActionLink("Home", "Index", "Home")</li> | ||
<li>@Html.ActionLink("About", "About", "Home")</li> | ||
<li>@Html.ActionLink("Contact", "Contact", "Home")</li> | ||
</ul> | ||
</nav> | ||
</div> | ||
</header> | ||
<div id="body"> | ||
@RenderSection("featured", required: false) | ||
<section class="content-wrapper main-content clear-fix"> | ||
@RenderBody() | ||
</section> | ||
</div> | ||
<footer> | ||
<div class="content-wrapper"> | ||
<div class="float-left"> | ||
<p>© @DateTime.Now.Year - <a href="http://www.stefanprodan.eu">Stefan Prodan's Tech Notes</a></p> | ||
</div> | ||
</header> | ||
<div id="body"> | ||
@RenderSection("featured", required: false) | ||
<section class="content-wrapper main-content clear-fix"> | ||
@RenderBody() | ||
</section> | ||
</div> | ||
<footer> | ||
<div class="content-wrapper"> | ||
<div class="float-left"> | ||
<p>© @DateTime.Now.Year - <a href="http://www.stefanprodan.eu">Stefan Prodan's Tech Notes</a></p> | ||
</div> | ||
</footer> | ||
</div> | ||
</footer> | ||
|
||
@if (HttpContext.Current.IsDebuggingEnabled) | ||
{ | ||
@Html.RenderRequireJsSetup(Url.Content("~/Scripts"), | ||
Url.Content("~/Scripts/require.js"), | ||
new [] | ||
@if (HttpContext.Current.IsDebuggingEnabled) | ||
{ | ||
@Html.RenderRequireJsSetup( | ||
baseUrl: Url.Content("~/Scripts"), | ||
requireUrl: Url.Content("~/Scripts/require.js"), | ||
configsList: new[] | ||
{ | ||
"~/RequireJS.shared.config", | ||
"~/RequireJS.shared.config", | ||
"~/RequireJS.config" | ||
}) | ||
} | ||
else | ||
{ | ||
@Html.RenderRequireJsSetup(Url.Content("~/Scripts"), | ||
Url.Content("~/Scripts/require.js"), | ||
Server.MapPath("~/RequireJS.release.config")) | ||
} | ||
|
||
</body> | ||
} | ||
else | ||
{ | ||
@Html.RenderRequireJsSetup( | ||
baseUrl: Url.Content("~/Scripts"), | ||
requireUrl: Url.Content("~/Scripts/require.js"), | ||
urlArgs: MvcRenders.RenderAppVersion(), | ||
configPath: Server.MapPath("~/RequireJS.release.config")) | ||
} | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters