[英]YUI remove javascript comments
I need to remove comments (the "// This is a comment" like comments) from some Javascript code, I'm using YUI compressor, there is an option to do that? 我需要从一些Javascript代码中删除评论(“这是评论”,如评论),我正在使用YUI压缩器,有一个选项可以做到这一点吗?
Thanks 谢谢
Thanks for the response, I'm trying to merge several scripts and after compress with YUI; 感谢您的回复,我正在尝试合并多个脚本并在使用YUI压缩之后; I've found if I compress and then merge the scripts it works, but if I merge and then compress, something goes wrong and I got a broken script
我发现如果我压缩然后合并它工作的脚本,但如果我合并然后压缩,出错了,我的脚本坏了
YUI Compressor removes comments by default. YUI Compressor默认删除注释。 You have to use a special comment format to keep comments.
您必须使用特殊注释格式来保留注释。
/*! This comment will not be removed, so it's a good place to put a copyright */
// this comment will be removed
/* this one too */
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.