是否有任何javascript minifiers保留换行符? [英] Are there any javascript minifiers that preserve line breaks?
本文介绍了是否有任何javascript minifiers保留换行符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
始终在第1行报告错误的客户端报告错误(因为文件被缩小)不是很有用。我想在保留换行符的同时缩小我的代码,以便获得有意义的行号。
Error reporting from the client that always reports an error on line 1 (because the file is minified) is not very useful. I'd like to minify my code while preserving line breaks so that I get meaningful line numbers.
是否有任何javascript minifiers可以选择保留换行符?
Are there any javascript minifiers that have an option to preserve line breaks?
推荐答案
看看封闭编译器,启用了漂亮的打印选项
Take a look at closure compiler from Google with pretty print option enabled
如果使用命令行工具,还有很多选项。
There are also plenty of options if you use the command line tool.
这篇关于是否有任何javascript minifiers保留换行符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文