> I've found that the easiest way to reduce the amount of 
> whitespace is to remove it from the actual templates once 
> they've been deleloped, though it obviously means your file 
> back up system needs to be pretty, er, well backed up.
> 
> Here's what i do:
> 1. develop on one server and use visual source safe.
> 2. Load the templates up to the test server from VSS
> 3. use a little app i wrote that uses CFFILE and Lee Borkman's
> CF_LESSWHITESPACE tag to rip out any whitespace and empty 
> lines from the actual CFM files
> 4. If it still works (and it hasn't failed yet) then thats 
> what goes up to the live server
> 
> As i say, it does mean that you need to be _sure_ that you're 
> not messing up your original files, but other than that it seems 
> to work a treat.
> 
> Removing carriage returns too would be nice, but i haven't 
> had time to make sure any js wasn't messed up.
> 
> It also has the benefit of discouraging anyone from making 
> changes to the templates on the test or live servers - they're 
> kind of hard to read....

I favor this approach also, although to be honest we haven't implemented
this yet at Fig Leaf. I've been testing this from another angle, using WSH
to parse all the files, and to remove carriage returns. It really needs to
be just one more step in the deployment process.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to