J
Jonathan Kamens
OK, so I've searched high and low for the answer to this
question. Perhaps there is an answer that I just couldn't
find because it was too hard to filter out the signal from
the noise in the search results.
I want a tool I can install on Linux that will reformat
JavaScript. I've found the javascript-mode that comes with
XEmacs and installed it with no trouble into my GNU Emacs
installation, and I can use that to reindent, but I can't use
that to format the code nicely if, e.g., all the extra
newlines and whitespace were removed to reduce download time
and obfuscate the code. I've also found that GNU indent can
"mostly" indent JavaScript, but it has problems with missing
semicolons, JavaScript string constants bounded by single
quotes instead of double quotes, and JavaScript regular
expressions operators.
So, is there something for Linux specifically designed to
take ugly JavaScript and make it pretty?
Thanks in advance for any help you can provide. And I
apologize if this question has been asked and answered; I
simply can't find the answer, despite looking pretty hard for
it.
question. Perhaps there is an answer that I just couldn't
find because it was too hard to filter out the signal from
the noise in the search results.
I want a tool I can install on Linux that will reformat
JavaScript. I've found the javascript-mode that comes with
XEmacs and installed it with no trouble into my GNU Emacs
installation, and I can use that to reindent, but I can't use
that to format the code nicely if, e.g., all the extra
newlines and whitespace were removed to reduce download time
and obfuscate the code. I've also found that GNU indent can
"mostly" indent JavaScript, but it has problems with missing
semicolons, JavaScript string constants bounded by single
quotes instead of double quotes, and JavaScript regular
expressions operators.
So, is there something for Linux specifically designed to
take ugly JavaScript and make it pretty?
Thanks in advance for any help you can provide. And I
apologize if this question has been asked and answered; I
simply can't find the answer, despite looking pretty hard for
it.