File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1+ using System ;
12using ServiceStack ;
23using ServiceStack . Html ;
34using NUglify ;
@@ -6,7 +7,18 @@ namespace SharpScript
67{
78 public class NUglifyJsMinifier : ICompressor
89 {
9- public string Compress ( string js ) => Uglify . Js ( js ) . Code ;
10+ public string Compress ( string js )
11+ {
12+ try
13+ {
14+ return Uglify . Js ( js ) . Code ;
15+ }
16+ catch ( Exception e )
17+ {
18+ Console . WriteLine ( e ) ;
19+ return js ;
20+ }
21+ }
1022 }
1123 public class NUglifyCssMinifier : ICompressor
1224 {
Original file line number Diff line number Diff line change 99 <ItemGroup >
1010 <PackageReference Include =" System.Collections.NonGeneric" Version =" 4.3.*" />
1111 <PackageReference Include =" System.IO.FileSystem.DriveInfo" Version =" 4.3.*" />
12- <PackageReference Include =" NUglify" Version =" 1.5.13 " />
12+ <PackageReference Include =" NUglify" Version =" 1.20.0 " />
1313
1414 <PackageReference Include =" ServiceStack" Version =" 6.*" />
1515 <PackageReference Include =" ServiceStack.Interfaces" Version =" 6.*" />
You can’t perform that action at this time.
0 commit comments