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 ;
1
2
using ServiceStack ;
2
3
using ServiceStack . Html ;
3
4
using NUglify ;
@@ -6,7 +7,18 @@ namespace SharpScript
6
7
{
7
8
public class NUglifyJsMinifier : ICompressor
8
9
{
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
+ }
10
22
}
11
23
public class NUglifyCssMinifier : ICompressor
12
24
{
Original file line number Diff line number Diff line change 9
9
<ItemGroup >
10
10
<PackageReference Include =" System.Collections.NonGeneric" Version =" 4.3.*" />
11
11
<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 " />
13
13
14
14
<PackageReference Include =" ServiceStack" Version =" 6.*" />
15
15
<PackageReference Include =" ServiceStack.Interfaces" Version =" 6.*" />
You can’t perform that action at this time.
0 commit comments