Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 20th, 2007, 09:52 AM
Authorized User
 
Join Date: Oct 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP and HTML compactor

Not sure if this is the right place for this question, but:

I am going to deliver an ASP application that contains VB Script, HTML and Javascript.

I would like to compact all the code to remove blank lines and all comments, before I deliver it.

Is there a utility available to do this?

Note that I do NOT wish to make the code completely unreadable (i.e. totally obfuscate it).

Thanks.
 
Old February 20th, 2007, 10:10 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

The only apps that I know of that do anything similar to this are the ones that completely obfuscate the code. Not sure if there is an app out there that will remove just blank lines and comments though, in the case of the blank lines anyway, it would be fairly painless to write an app that would iterate through your entire application directory and just open the files as text and read through each line and match for the regex pattern \r\n (Carriage Return Line feed) and replace it with nothing.

The comments are a bit more tricky to match as a pattern since the ' occurs quite often in actual code and not just to denote comments.

Sorry I can't be of more help.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html

Discussion:
http://p2p.wrox.com/topic.asp?TOPIC_ID=56429





Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I add asp to html metalman923 HTML Code Clinic 1 October 5th, 2006 10:38 AM
Variable in ASP HTML? thenextbillgates ASP.NET 1.0 and 1.1 Basics 0 April 7th, 2006 09:28 PM
ASP code in html file Cinderella Classic ASP Basics 5 September 10th, 2004 03:08 AM
Need help with IF in HTML/ASP A. GRebstad Classic ASP Databases 7 September 3rd, 2003 01:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.