YUI JS Minifier settings
Inheritance: YuiCommonMinificationSettingsBase
Esempio n. 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);
        }
Esempio n. 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;
        }
Esempio n. 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;
        }
Esempio n. 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);
        }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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;
        }
Esempio n. 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;
        }
Esempio n. 11
0
 /// <summary>
 /// Constructs instance of YUI JS Minifier
 /// </summary>
 /// <param name="settings">Settings of YUI JS Minifier</param>
 public YuiJsMinifier(YuiJsMinificationSettings settings)
 {
     _settings = settings;
 }
Esempio n. 12
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;
        }
		/// <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;
		}