YUI CSS Minifier settings
Inheritance: YuiCommonMinificationSettingsBase
示例#1
0
        /// <summary>
        /// Applies a settings to CSS-code compressor
        /// </summary>
        /// <param name="cssCompressor">CSS-code compressor</param>
        /// <param name="cssSettings">Settings of YUI CSS Minifier</param>
        private static void ApplyCssSettingsToCssCompressor(CssCompressor cssCompressor,
                                                            YuiCssMinificationSettings cssSettings)
        {
            ApplyCommonSettingsToCompressor(cssCompressor, cssSettings);

            cssCompressor.RemoveComments = cssSettings.RemoveComments;
        }
示例#2
0
        /// <summary>
        /// Applies a CSS settings to original CSS minifier
        /// </summary>
        /// <param name="originalMinifier">Original CSS minifier</param>
        /// <param name="settings">CSS minifier settings</param>
        private static void ApplyCssSettingsToOriginalCssMinifier(CssCompressor originalMinifier,
                                                                  YuiCssMinificationSettings settings)
        {
            ApplyCommonSettingsToOriginalMinifier(originalMinifier, settings);

            originalMinifier.RemoveComments = settings.RemoveComments;
        }
示例#3
0
        /// <summary>
        /// Creates a instance of original CSS minifier
        /// </summary>
        /// <param name="settings">CSS minifier settings</param>
        /// <returns>Instance of original CSS minifier</returns>
        private static CssCompressor CreateOriginalCssMinifierInstance(YuiCssMinificationSettings settings)
        {
            var originalMinifier = new CssCompressor();

            ApplyCommonSettingsToOriginalMinifier(originalMinifier, settings);
            originalMinifier.RemoveComments = settings.RemoveComments;

            return(originalMinifier);
        }
示例#4
0
        /// <summary>
        /// Creates a instance of original CSS minifier
        /// </summary>
        /// <param name="settings">CSS minifier settings</param>
        /// <param name="isInlineCode">Flag for whether to create a settings for inline code</param>
        /// <returns>Instance of original CSS minifier</returns>
        private static CssCompressor CreateOriginalCssMinifierInstance(YuiCssMinificationSettings settings,
                                                                       bool isInlineCode)
        {
            var originalMinifier = new CssCompressor();

            ApplyCssSettingsToOriginalCssMinifier(originalMinifier, settings);
            if (isInlineCode)
            {
                originalMinifier.LineBreakPosition = -1;
            }

            return(originalMinifier);
        }
示例#5
0
 /// <summary>
 /// Constructs instance of YUI CSS Minifier
 /// </summary>
 /// <param name="settings">Settings of YUI CSS Minifier</param>
 public YuiCssMinifier(YuiCssMinificationSettings settings)
 {
     _settings = settings;
 }
 /// <summary>
 /// Creates a instance of YUI CSS Minifier factory
 /// </summary>
 /// <param name="settings">Minification settings used to configure the YUI CSS Minifier</param>
 public YuiCssMinifierFactory(YuiCssMinificationSettings settings)
 {
     MinificationSettings = settings;
 }
示例#7
0
 /// <summary>
 /// Constructs an instance of the YUI CSS Minifier
 /// </summary>
 /// <param name="settings">Settings of YUI CSS Minifier</param>
 public YuiCssMinifier(YuiCssMinificationSettings settings)
 {
     _originalEmbeddedCssMinifier = CreateOriginalCssMinifierInstance(settings, false);
     _originalInlineCssMinifier   = CreateOriginalCssMinifierInstance(settings, true);
 }
示例#8
0
 /// <summary>
 /// Constructs an instance of the YUI CSS Minifier
 /// </summary>
 /// <param name="settings">Settings of YUI CSS Minifier</param>
 public YuiCssMinifier(YuiCssMinificationSettings settings)
 {
     _originalEmbeddedCssMinifier = CreateOriginalCssMinifierInstance(settings, false);
     _originalInlineCssMinifier = CreateOriginalCssMinifierInstance(settings, true);
 }
示例#9
0
        /// <summary>
        /// Creates a instance of original CSS minifier
        /// </summary>
        /// <param name="settings">CSS minifier settings</param>
        /// <param name="isInlineCode">Flag for whether to create a settings for inline code</param>
        /// <returns>Instance of original CSS minifier</returns>
        private static CssCompressor CreateOriginalCssMinifierInstance(YuiCssMinificationSettings settings,
			bool isInlineCode)
        {
            var originalMinifier = new CssCompressor();
            ApplyCssSettingsToOriginalCssMinifier(originalMinifier, settings);
            if (isInlineCode)
            {
                originalMinifier.LineBreakPosition = -1;
            }

            return originalMinifier;
        }
示例#10
0
        /// <summary>
        /// Applies a CSS settings to original CSS minifier
        /// </summary>
        /// <param name="originalMinifier">Original CSS minifier</param>
        /// <param name="settings">CSS minifier settings</param>
        private static void ApplyCssSettingsToOriginalCssMinifier(CssCompressor originalMinifier,
			YuiCssMinificationSettings settings)
        {
            ApplyCommonSettingsToOriginalMinifier(originalMinifier, settings);

            originalMinifier.RemoveComments = settings.RemoveComments;
        }
示例#11
0
 /// <summary>
 /// Constructs instance of YUI CSS Minifier
 /// </summary>
 /// <param name="settings">Settings of YUI CSS Minifier</param>
 public YuiCssMinifier(YuiCssMinificationSettings settings)
 {
     _settings = settings;
 }
示例#12
0
        /// <summary>
        /// Applies a settings to CSS-code compressor
        /// </summary>
        /// <param name="cssCompressor">CSS-code compressor</param>
        /// <param name="cssSettings">Settings of YUI CSS Minifier</param>
        private static void ApplyCssSettingsToCssCompressor(CssCompressor cssCompressor,
			YuiCssMinificationSettings cssSettings)
        {
            ApplyCommonSettingsToCompressor(cssCompressor, cssSettings);

            cssCompressor.RemoveComments = cssSettings.RemoveComments;
        }
 /// <summary>
 /// Creates a instance of YUI CSS Minifier factory
 /// </summary>
 /// <param name="settings">Minification settings used to configure the YUI CSS Minifier</param>
 public YuiCssMinifierFactory(YuiCssMinificationSettings settings)
 {
     MinificationSettings = settings;
 }