/// <summary> /// <para> /// Enable SassAndCoffee support in the application. /// </para> /// <para> /// SassAndCoffee supports on the fly compilation and caching of CoffeeScript and Sass, /// along with concatenation and minification. /// </para> /// </summary> /// <param name="pipelines">Application pipelines to hook into</param> /// <param name="cache">Cache provider to use</param> /// <param name="rootPathProvider">Root path provider</param> public static void Enable(IApplicationPipelines pipelines, ICompiledCache cache, IRootPathProvider rootPathProvider) { var host = new NancyCompilerHost(rootPathProvider); var compiler = new ContentCompiler(host, cache); pipelines.BeforeRequest.AddItemToStartOfPipeline(GetPipelineHook(compiler)); }
/// <summary> /// <para> /// Enable SassAndCoffee support in the application. /// </para> /// <para> /// SassAndCoffee supports on the fly compilation and caching of CoffeeScript and Sass, /// along with concatenation and minification. /// </para> /// </summary> /// <param name="pipelines">Application pipelines to hook into</param> /// <param name="cache">Cache provider to use</param> /// <param name="rootPathProvider">Root path provider</param> public static void Enable(IPipelines pipelines, ICompiledCache cache, IRootPathProvider rootPathProvider) { var host = new NancyCompilerHost(rootPathProvider); var compiler = new ContentCompiler(host, cache); pipelines.BeforeRequest.AddItemToStartOfPipeline(GetPipelineHook(compiler)); }