/// <summary> /// Minifies the specified input code. /// </summary> /// <param name="inputCode"> /// The input code. /// </param> /// <returns> /// The minify. /// </returns> public static string Minify(string inputCode) { var minify = new JSMinify(); var outputCode = new StringBuilder(); using (minify.textReader = new StringReader(inputCode)) { using (minify.writer = new StringWriter(outputCode)) { minify.Pack(); } } return(outputCode.ToString()); }
/// <summary> /// Minifies the specified input code. /// </summary> /// <param name="inputCode"> /// The input code. /// </param> /// <returns> /// The minify. /// </returns> public static string Minify(string inputCode) { var minify = new JSMinify(); var outputCode = new StringBuilder(); using (minify.textReader = new StringReader(inputCode)) { using (minify.writer = new StringWriter(outputCode)) { minify.Pack(); } } return outputCode.ToString(); }