Wipe out commenting from client scripts

Post Reply
sangnandar
User
Posts: 980

Wipe out commenting from client scripts

Post by sangnandar »

For the sake of documentation we do a lot of commenting both on server scripts and client scripts. Commenting on php scripts is no problem because it's not exposed to end-user. But client scripts.., the comments exposed to end-user.
It would be nice to have client scripts comments wiped out during file generation. Would also nice if server scripts comments wiped out too and leave all comments just inside *.pmp files.


Adam
User
Posts: 480

Post by Adam »

I second this idea!

1) remove PHP comments from generated PHP files
2) remove JS comments from generated PHP files
3) remove comments from JS files
4) compress (remove whitespace) JS within PHP files

Option #1 thru #3 should be selectable (possibly one option for PHP comments and another for JS comments as commented code is useful during development)
Option #4 should be based on the existing "compress JS" advanced setting

Additional thought: an option to compress (remove whitespace) from generated PHP files


bkay
User
Posts: 101

Post by bkay »

+1 on this.


ross_t
User
Posts: 139

Post by ross_t »

+1 on this from me as well.


andyrav
User
Posts: 641

Post by andyrav »

+1


Webmaster
User
Posts: 9427

Post by Webmaster »

PHPMaker 2020 can compress Client Scripts and Startup Scripts. If compressed, the comments are removed.


Post Reply