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 badges3 Answers
Reset to default 7YUI 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.