Example #1
0
 public static string MinifyJs(string js, bool ignoreErrors = false) //removed the out file path  
 {
   string result = js;
   try
   {
     result = new JSMinifier().Compress(js);
   }
   catch (Exception ex)
   {
     if (!ignoreErrors)
     {
       throw;
     }
   }
   return result;
 }
Example #2
0
        public static string MinifyJs(string js, bool ignoreErrors = false) //removed the out file path
        {
            string result = js;

            try
            {
                result = new JSMinifier().Compress(js);
            }
            catch (Exception)
            {
                if (!ignoreErrors)
                {
                    throw;
                }
            }
            return(result);
        }