npm package can be used to beautify the javascript file for easy read and debug.
To do so, first download js-beautify package by run:
npm -g install js-beautify
then run the follow command to beautify it
js-beautify oldfile.js -o newfile.js
The new file will be beautified with proper indent.
If you use xcode for most of your work, then it is a good idea to install the xcode plugin for js-beautify. The detailed information is available at
https://github.com/bumaociyuan/JSFormatter-Xcode
To do so, first download js-beautify package by run:
npm -g install js-beautify
then run the follow command to beautify it
js-beautify oldfile.js -o newfile.js
The new file will be beautified with proper indent.
If you use xcode for most of your work, then it is a good idea to install the xcode plugin for js-beautify. The detailed information is available at
https://github.com/bumaociyuan/JSFormatter-Xcode
No comments:
Post a Comment