示例#1
0
        string YUI_JS(string filesource, ConfigSettings.YUICompressionSettings.Js JsSettings)
        {
            try
            {
                var jscompressor = new JavaScriptCompressor();
                jscompressor.CompressionType       = JsSettings.CompressionType;
                jscompressor.DisableOptimizations  = JsSettings.DisableOptimizations;
                jscompressor.Encoding              = JsSettings.Encoding;
                jscompressor.IgnoreEval            = JsSettings.IgnoreEval;
                jscompressor.LineBreakPosition     = JsSettings.LineBreakPosition;
                jscompressor.ObfuscateJavascript   = JsSettings.ObfuscateJavascript;
                jscompressor.PreserveAllSemicolons = JsSettings.PreserveAllSemicolons;
                jscompressor.ThreadCulture         = JsSettings.ThreadCulture;

                return(jscompressor.Compress(filesource));
            }
            catch (Exception ex)
            {
                var msg = ex.Message;
                return(filesource);
            }
        }
示例#2
0
 internal BundleItFile(string debugrelativepath, string minifiedrelativepath, bool IsCDN, ConfigSettings.YUICompressionSettings.Js YuiJsSettings)
 {
     this.debugrelativepath    = debugrelativepath;
     this.minifiedrelativepath = minifiedrelativepath;
     this.IsCDN         = IsCDN;
     this.YuiJsSettings = YuiJsSettings;
 }
示例#3
0
 public BundleItFile(string relativepath, ConfigSettings.YUICompressionSettings.Js YuiJsSettings) : this(relativepath, string.Empty, false, YuiJsSettings)
 {
 }