A Javascript code reformatter/optimizer with customizable colors that can either be used by direct input or batch files by dragging the .js files directly onto the buttons.
Useful when I want to make my widgets file size smaller.
May 20, 2006 ·
version 1.0 Harry Whitfield
You may be able to retain comments by converting them into function calls before the reformatting, and then by converting the function calls back into comments after the reformatting.
You might also be able to retain some (deliberate) white space with a similar trick.
May 20, 2006 ·
version 1.0 Harry Whitfiedl
This widget makes clever use of the internal javascript parser to "prettify" javascript code. The effect of this process is to remove all comments and any white space deliberately added by the programmer. In my opinion, this makes the reformatting virtually useless.
The "optimzer" removes even more white space and is, in effect, a text minimizer, which could be useful in some circumstances.
At a more trivial level, the text area is too small for manual use and much too big …for drag and drop use. The window should be made resizable. The buttons should change appearance when a file is dragged over them, and it should be possible to drag and drop a file onto the main text area.
A flexible reformatting widget would be very useful, but, sadly, this is not yet such a widget.More