YUI JS Minifier settings
Inheritance: YuiCommonMinificationSettingsBase
Example #1
0
        /// <summary>
        /// Creates a instance of original JS minifier
        /// </summary>
        /// <param name="settings">JS minifier settings</param>
        /// <returns>Instance of original JS minifier</returns>
        private static JavaScriptCompressor CreateOriginalJsMinifierInstance(
            YuiJsMinificationSettings settings)
        {
            var originalMinifier = new JavaScriptCompressor();

            ApplyJsSettingsToOriginalJsMinifier(originalMinifier, settings);

            return(originalMinifier);
        }
Example #2
0
        /// <summary>
        /// Applies a JS settings to original JS minifier
        /// </summary>
        /// <param name="originalMinifier">Original JS minifier</param>
        /// <param name="settings">JS minifier settings</param>
        private static void ApplyJsSettingsToOriginalJsMinifier(JavaScriptCompressor originalMinifier,
                                                                YuiJsMinificationSettings settings)
        {
            ApplyCommonSettingsToOriginalMinifier(originalMinifier, settings);

            originalMinifier.ObfuscateJavascript   = settings.ObfuscateJavascript;
            originalMinifier.PreserveAllSemicolons = settings.PreserveAllSemicolons;
            originalMinifier.DisableOptimizations  = settings.DisableOptimizations;
            originalMinifier.IgnoreEval            = settings.IgnoreEval;
        }
Example #3
0
        /// <summary>
        /// Applies a settings to JS-code compressor
        /// </summary>
        /// <param name="jsCompressor">JS-code compressor</param>
        /// <param name="jsSettings">Settings of YUI JS Minifier</param>
        private static void ApplyJsSettingsToJsCompressor(JavaScriptCompressor jsCompressor,
                                                          YuiJsMinificationSettings jsSettings)
        {
            ApplyCommonSettingsToCompressor(jsCompressor, jsSettings);

            jsCompressor.ObfuscateJavascript   = jsSettings.ObfuscateJavascript;
            jsCompressor.PreserveAllSemicolons = jsSettings.PreserveAllSemicolons;
            jsCompressor.DisableOptimizations  = jsSettings.DisableOptimizations;
            jsCompressor.IgnoreEval            = jsSettings.IgnoreEval;
        }
Example #4
0
        /// <summary>
        /// Creates a instance of original JS minifier
        /// </summary>
        /// <param name="settings">JS minifier settings</param>
        /// <returns>Instance of original JS minifier</returns>
        private static JavaScriptCompressor CreateOriginalJsMinifierInstance(
            YuiJsMinificationSettings settings)
        {
            var originalMinifier = new JavaScriptCompressor();

            ApplyCommonSettingsToOriginalMinifier(originalMinifier, settings);
            originalMinifier.ObfuscateJavascript   = settings.ObfuscateJavascript;
            originalMinifier.PreserveAllSemicolons = settings.PreserveAllSemicolons;
            originalMinifier.DisableOptimizations  = settings.DisableOptimizations;
            originalMinifier.IgnoreEval            = settings.IgnoreEval;

            return(originalMinifier);
        }
Example #5
0
 /// <summary>
 /// Constructs an instance of the YUI JS Minifier
 /// </summary>
 /// <param name="settings">Settings of the YUI JS Minifier</param>
 public YuiJsMinifier(YuiJsMinificationSettings settings)
 {
     _settings = settings;
 }
Example #6
0
 /// <summary>
 /// Constructs an instance of the YUI JS Minifier factory
 /// </summary>
 /// <param name="settings">Minification settings used to configure the YUI JS Minifier</param>
 public YuiJsMinifierFactory(YuiJsMinificationSettings settings)
 {
     MinificationSettings = settings;
 }
Example #7
0
 /// <summary>
 /// Constructs an instance of the YUI JS Minifier
 /// </summary>
 /// <param name="settings">Settings of YUI JS Minifier</param>
 public YuiJsMinifier(YuiJsMinificationSettings settings)
 {
     _originalJsMinifier = CreateOriginalJsMinifierInstance(settings);
 }
Example #8
0
 /// <summary>
 /// Constructs an instance of the YUI JS Minifier
 /// </summary>
 /// <param name="settings">Settings of YUI JS Minifier</param>
 public YuiJsMinifier(YuiJsMinificationSettings settings)
 {
     _originalJsMinifier = CreateOriginalJsMinifierInstance(settings);
 }
Example #9
0
        /// <summary>
        /// Creates a instance of original JS minifier
        /// </summary>
        /// <param name="settings">JS minifier settings</param>
        /// <returns>Instance of original JS minifier</returns>
        private static JavaScriptCompressor CreateOriginalJsMinifierInstance(
			YuiJsMinificationSettings settings)
        {
            var originalMinifier = new JavaScriptCompressor();
            ApplyJsSettingsToOriginalJsMinifier(originalMinifier, settings);

            return originalMinifier;
        }
Example #10
0
        /// <summary>
        /// Applies a JS settings to original JS minifier
        /// </summary>
        /// <param name="originalMinifier">Original JS minifier</param>
        /// <param name="settings">JS minifier settings</param>
        private static void ApplyJsSettingsToOriginalJsMinifier(JavaScriptCompressor originalMinifier,
			YuiJsMinificationSettings settings)
        {
            ApplyCommonSettingsToOriginalMinifier(originalMinifier, settings);

            originalMinifier.ObfuscateJavascript = settings.ObfuscateJavascript;
            originalMinifier.PreserveAllSemicolons = settings.PreserveAllSemicolons;
            originalMinifier.DisableOptimizations = settings.DisableOptimizations;
            originalMinifier.IgnoreEval = settings.IgnoreEval;
        }
 /// <summary>
 /// Constructs instance of YUI JS Minifier
 /// </summary>
 /// <param name="settings">Settings of YUI JS Minifier</param>
 public YuiJsMinifier(YuiJsMinificationSettings settings)
 {
     _settings = settings;
 }
        /// <summary>
        /// Applies a settings to JS-code compressor
        /// </summary>
        /// <param name="jsCompressor">JS-code compressor</param>
        /// <param name="jsSettings">Settings of YUI JS Minifier</param>
        private static void ApplyJsSettingsToJsCompressor(JavaScriptCompressor jsCompressor,
			YuiJsMinificationSettings jsSettings)
        {
            ApplyCommonSettingsToCompressor(jsCompressor, jsSettings);

            jsCompressor.ObfuscateJavascript = jsSettings.ObfuscateJavascript;
            jsCompressor.PreserveAllSemicolons = jsSettings.PreserveAllSemicolons;
            jsCompressor.DisableOptimizations = jsSettings.DisableOptimizations;
            jsCompressor.IgnoreEval = jsSettings.IgnoreEval;
        }
		/// <summary>
		/// Constructs an instance of the YUI JS Minifier factory
		/// </summary>
		/// <param name="settings">Minification settings used to configure the YUI JS Minifier</param>
		public YuiJsMinifierFactory(YuiJsMinificationSettings settings)
		{
			MinificationSettings = settings;
		}