public static string CompressJS(Stream stream) { var jsMin = new JSMin(); if (!stream.CanRead) { throw new InvalidOperationException("Cannot read input stream"); } if (stream.CanSeek) { stream.Position = 0; } return(jsMin.Minify(new StreamReader(stream))); }
public static string Minify(TextSource js) { var min = new JSMin(); return(min.Minify(js)); }