Skip to content

Instantly share code, notes, and snippets.

@chrisortman
Created March 12, 2012 15:54
Show Gist options
  • Save chrisortman/2022940 to your computer and use it in GitHub Desktop.
Save chrisortman/2022940 to your computer and use it in GitHub Desktop.
Non minified javascript bundle
public class NonMinifyingJavascript : IBundleTransform
{
public void Process(BundleContext context, BundleResponse bundle)
{
if(bundle == null)
{
throw new ArgumentNullException("bundle");
}
context.HttpContext.Response.Cache.SetLastModifiedFromFileDependencies();
foreach(FileInfo file in bundle.Files)
{
HttpContext.Current.Response.AddFileDependency(file.FullName);
}
bundle.ContentType = "text/javascript";
//base.Process(context, bundle);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment