Skip to content

Instantly share code, notes, and snippets.

@jacbar
Created September 23, 2012 21:52
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 jacbar/622ffe735ed609005fa6 to your computer and use it in GitHub Desktop.
Save jacbar/622ffe735ed609005fa6 to your computer and use it in GitHub Desktop.
public class CoffeeScriptCompiler : JsMinify
{
public override void Process(BundleContext context, BundleResponse response)
{
var csEngine = new CoffeeSharp.CoffeeScriptEngine();
string result = string.Empty;
foreach(var file in response.Files)
{
using (var reader = new StreamReader(file.FullName))
{
result += csEngine.Compile(reader.ReadToEnd());
}
}
response.Content = result;
base.Process(context, response);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment