Bundler: ScriptsBundler and StylesBundler, Bundles all the scripts and style sheets on specified directories.
This commit is contained in:
22
Scrummer/Code/ScriptsBundler.cs
Normal file
22
Scrummer/Code/ScriptsBundler.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Scrummer.Code
|
||||
{
|
||||
public class ScriptsBundler : IHttpHandler
|
||||
{
|
||||
public bool IsReusable
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public void ProcessRequest(HttpContext context)
|
||||
{
|
||||
Bundler bundler = new Bundler(context.Server.MapPath("~/Scripts/"));
|
||||
context.Response.ContentType = "text/javascript";
|
||||
bundler.WriteResponse(context.Response.OutputStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user