YUI删除javascript评论

编程入门 行业动态 更新时间:2024-10-09 07:27:44
本文介绍了YUI删除javascript评论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要从一些Javascript代码中删除评论(//这是一条评论,如评论),我使用YUI压缩程序,有一个选项吗?

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?

感谢

感谢回复,我试图合并几个脚本, YUI;我发现如果我压缩,然后合并脚本它的工作,但如果我合并,然后压缩,出现问题,我有一个破碎的脚本

Thanks for the response, I'm trying to merge several scripts and after compress with 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默认删除注释。您必须使用特殊注释格式保留注释。

YUI Compressor removes comments by default. 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 */

更多推荐

YUI删除javascript评论

本文发布于:2023-11-28 17:50:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643374.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:YUI   javascript

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!