/// <summary> /// Adds nuglify services for smidge with optional code settings /// </summary> /// <param name="services"></param> /// <param name="nuglifySettings"></param> /// <returns></returns> public static IServiceCollection AddSmidgeNuglify(this IServiceCollection services, NuglifySettings nuglifySettings = null) { //pre processors services.AddSingleton <IPreProcessor, NuglifyCss>(); services.AddSingleton <IPreProcessor, NuglifyJs>(); services.AddSingleton <ISourceMapDeclaration, SourceMapDeclaration>(); services.AddSingleton <NuglifySettings>(provider => nuglifySettings ?? new NuglifySettings(new NuglifyCodeSettings(null), new CssSettings())); return(services); }
/// <summary> /// Adds nuglify services for smidge with optional code settings /// </summary> /// <param name="services"></param> /// <param name="nuglifySettings"></param> /// <returns></returns> public static IServiceCollection AddSmidgeNuglify(this IServiceCollection services, NuglifySettings nuglifySettings = null) { //pre processors services.AddSingleton <IPreProcessor, NuglifyCss>(); services.AddSingleton <IPreProcessor, NuglifyJs>(); services.AddSingleton <ISourceMapDeclaration, SourceMapDeclaration>(); services.AddSingleton <NuglifySettings>(provider => nuglifySettings ?? new NuglifySettings(new NuglifyCodeSettings(null), new CssSettings())); services.AddTransient <IConfigureOptions <SmidgeOptions>, NuglifySmidgeOptionsSetup>(); //conventions services.AddSingleton <IFileProcessingConvention, NuglifyMinifiedFilePathConvention>(); return(services); }
public NuglifyCss(NuglifySettings settings) { _settings = settings; }
public NuglifyJs(NuglifySettings settings, ISourceMapDeclaration sourceMapDeclaration) { _settings = settings; _sourceMapDeclaration = sourceMapDeclaration; }