Common settings of the NUglify Minifier
Esempio n. 1
0
 /// <summary>
 /// Maps a common minifier settings
 /// </summary>
 /// <param name="originalSettings">Original common minifier settings</param>
 /// <param name="settings">Common minifier settings</param>
 protected static void MapCommonSettings(CommonSettings originalSettings,
                                         NUglifyCommonMinificationSettingsBase settings)
 {
     originalSettings.BlocksStartOnSameLine = Utils.GetEnumFromOtherEnum <WmmBlockStart, NuBlockStart>(
         settings.BlocksStartOnSameLine);
     originalSettings.IgnoreAllErrors    = settings.IgnoreAllErrors;
     originalSettings.IgnoreErrorList    = settings.IgnoreErrorList;
     originalSettings.IndentSize         = settings.IndentSize;
     originalSettings.LineBreakThreshold = settings.LineBreakThreshold;
     originalSettings.OutputMode         = Utils.GetEnumFromOtherEnum <WmmOutputMode, NuOutputMode>(
         settings.OutputMode);
     originalSettings.PreprocessorDefineList = settings.PreprocessorDefineList;
     originalSettings.TermSemicolons         = settings.TermSemicolons;
     originalSettings.WarningLevel           = 2;
 }
        /// <summary>
        /// Maps a common minifier settings
        /// </summary>
        /// <param name="originalSettings">Original common minifier settings</param>
        /// <param name="settings">Common minifier settings</param>
        protected static void MapCommonSettings(CommonSettings originalSettings,
			NUglifyCommonMinificationSettingsBase settings)
        {
            originalSettings.BlocksStartOnSameLine = Utils.GetEnumFromOtherEnum<WmmBlockStart, NuBlockStart>(
                settings.BlocksStartOnSameLine);
            originalSettings.IgnoreAllErrors = settings.IgnoreAllErrors;
            originalSettings.IgnoreErrorList = settings.IgnoreErrorList;
            originalSettings.IndentSize = settings.IndentSize;
            originalSettings.LineBreakThreshold = settings.LineBreakThreshold;
            originalSettings.OutputMode = Utils.GetEnumFromOtherEnum<WmmOutputMode, NuOutputMode>(
                settings.OutputMode);
            originalSettings.PreprocessorDefineList = settings.PreprocessorDefineList;
            originalSettings.TermSemicolons = settings.TermSemicolons;
            originalSettings.WarningLevel = 2;
        }