public void Init(HttpApplication context) { var coffeeEngine = new CoffeeScriptCompiler(); var compilers = new ISimpleFileCompiler[] { new ConcatenationFileHandler(this), new MinifyingFileCompiler(coffeeEngine), new CoffeeScriptFileCompiler(coffeeEngine), new SassFileCompiler(), new JavascriptPassthroughCompiler(), }; _handlers = new Dictionary<ISimpleFileCompiler, IHttpHandler>(); foreach (var compiler in compilers) { compiler.Init(context); _handlers[compiler] = new CompilableFileHandler(compiler); } context.PostResolveRequestCache += (o, e) => { var app = o as HttpApplication; var compiler = MapPathToCompiler(app.Request.PhysicalPath); if (compiler == null) { return; } app.Context.RemapHandler(_handlers[compiler]); }; }
public void Init(HttpApplication context) { _engine = new CoffeeScriptCompiler(); }
public MinifyingFileCompiler(CoffeeScriptCompiler coffeeScriptEngine) { _coffeeEngine = coffeeScriptEngine; }
public CoffeeScriptFileCompiler(CoffeeScriptCompiler engine = null) { _engine = engine; }
public MinifyingFileCompiler(CoffeeScriptCompiler coffeeScriptEngine) { _coffeeEngine = new TrashStack<CoffeeScriptCompiler>(() => new CoffeeScriptCompiler()); _engine = new TrashStack<MinifyingCompiler>(() => new MinifyingCompiler()); }