Skip to content

Instantly share code, notes, and snippets.

@detroitpro
Created March 1, 2014 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save detroitpro/9296248 to your computer and use it in GitHub Desktop.
Save detroitpro/9296248 to your computer and use it in GitHub Desktop.
NancyFx fake asset piplelien
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