最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

asp.net - Is there any tools for automatic removal of comments from JavaScript code? - Stack Overflow

programmeradmin2浏览0评论

I'd like to have ments in my code, but I want them to be removed before deploying. Yes, it's not hard to write such a thing, but if it already exists… And how about ments in ASP pages?

I'd like to have ments in my code, but I want them to be removed before deploying. Yes, it's not hard to write such a thing, but if it already exists… And how about ments in ASP pages?

Share Improve this question asked Oct 16, 2008 at 17:56 z-bossz-boss 17.6k13 gold badges54 silver badges82 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 7

YUI Compressor in addition to removing ments and white-spaces, obfuscates local variables using the smallest possible variable name...

Besides the utility, there is the YUI Compressor Library for .NET, this library allows you to programmatically press JavaScript and CSS, or use it automatically with MsBuild...

Sounds like you are looking for a JSMin tool or similar.

There are many tools which you can purchase, but there are also some online tools you can use:

http://www.askapache./tools/online-pression-tool-pares-packer-jsmin-dojo-and-yui-pressor.html

http://www.askapache./online-tools/js-press/

Good Luck!

Are you going to press at runtime? I'd use packer and press your javascript through a generic handler.

发布评论

评论列表(0)

  1. 暂无评论