Created
March 1, 2014 20:02
-
-
Save detroitpro/9296248 to your computer and use it in GitHub Desktop.
NancyFx fake asset piplelien
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
protected override void ApplicationStartup(IWindsorContainer container, IPipelines pipelines) | |
{ | |
pipelines.BeforeRequest += (ctx) => | |
{ | |
ctx.ViewBag.Styles = Bundle.Css().RenderNamed("bundled"); | |
ctx.ViewBag.Scripts = Bundle.JavaScript().RenderNamed("vendor-scripts"); | |
return null; | |
}; | |
Bundle.Css() | |
.Add("~/content/styles/bootstrap.css") | |
.Add("~/content/styles/landing-page.css") | |
.AsCached("bundled", "~/content/styles/bundled"); | |
Bundle.JavaScript() | |
.Add("~/content/scripts/bootstrap.js") | |
.Add("~/content/scripts/jquery-2.1.0.js") | |
.AsCached("vendor-scripts", "~/content/scripts/vendor-scripts"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment