コード例 #1
0
ファイル: JsMin.cs プロジェクト: w8w8w8/Lumisoft.Net.Core
        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)));
        }
コード例 #2
0
ファイル: Js.cs プロジェクト: w8w8w8/Lumisoft.Net.Core
        public static string Minify(TextSource js)
        {
            var min = new JSMin();

            return(min.Minify(js));
        }