Pretty printer/code layout/reformat/minify
------------------------------------------
Key: VELOCITY-611
URL: https://issues.apache.org/jira/browse/VELOCITY-611
Project: Velocity
Issue Type: Wish
Components: Engine
Environment: Cross platform
Reporter: Adrian Tarau
Priority: Minor
I've always wanted to be able to re-layout a piece of generated text. It was a
dream of mine since I was a little boy:)
Even if you generate HTML most of the time the result is pretty ugly(not
readable) and when it came to generating code(like Java, JavaScript, etc) is
really important to have readable code.Especially when your trying to "debug"
something, it is a lot easier to locate the problem with a "pretty" content
layout.
In case of JavaScript it is even more problematic, because different browsers
can fail parsing generated JavaScript just because some separators are not on
the same line. Of course you can generate your pages, copy the code in
http://www.jslint.com/ and validate your code but is kind of .. not handy.Or
you could even compress your generated JavaScript(or HTML) to have a smaller
content or obfuscate your code a little bit.
I'm pretty sure these needs are not only mine, so if somebody out there already
have something (already) implemented(and it can be open sourced) or even
suggestions about which library to use(I expect we could re-use some of the
existing libraries to do pretty-print, at least HTML, XML it can be done pretty
easy and not so easy with JS or Java) please let me know.
I'm planning to create a public project to host this project and any
suggestions are welcomed. The library will be designed to be independent of
Velocity, so other template libraries could benefit of this work.
Thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]