/// <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)); }
public ContentCompiler(ICompilerHost host, ICompiledCache cache, IEnumerable<ISimpleFileCompiler> compilers) { _host = host; _cache = cache; _compilers = compilers; Init(); }
/// <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)); }
public ContentCompiler(ICompiledCache cache) { _cache = cache; _compilers = new ISimpleFileCompiler[] { new FileConcatenationCompiler(this), new MinifyingFileCompiler(), new CoffeeScriptFileCompiler(), new SassFileCompiler(), new JavascriptPassthroughCompiler(), }; }
public ContentCompiler(ICompiledCache cache, IEnumerable<ISimpleFileCompiler> compilers) { _cache = cache; _compilers = compilers; }