//== http://stackoverflow.com/questions/18985/what-javascript-code-beautifier-can-i-use-via-the-command-line-on-windows-and-li
//=== http://jsbeautifier.org/
* jsbeautifier source code is free and open, available on the github under MIT licence,
https://github.com/beautify-web/js-beautify
* jsbeautifier also has a command-line version (need V8?),
python library and a node package as well.
//=== uglify-js under nodejs
$ sudo npm install -g uglify-js
$ uglifyjs foo.js --beautify --output cutefoo.js
uglify uses spaces for indentation by default
to convert the 4-space-indentation to tab
$ unexpand --tabs=4 cutefoo.js > cuterfoo.js
//=== uncrustify?
http://uncrustify.sourceforge.net/
2015年4月16日 星期四
js code re-format, beautify
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言