How to automatically indent / format a single line js file?

A good former developer wanted to make our life more complicated before leaving our company and developing a whole JavaScript user interface in one line. I mean ... maybe it went bad after development ...

period ... there are a lot of mistakes that I need to fix .. and I wonder how you guys approach the automatic indentation of the whole code.

thank

+5
source share
1 answer

whole javascript user interface in one line

minification/ouglification. , . ( ):

  • , ( )
  • ,
  • (, if to ternaries, for to while)
  • /

, ,

:

  • JSBeautifier, - JS HTML. . , Sublime Text.

  • Grunt, JSBeautifier, , - JSBeautifier.

  • Chrome "" dev. ( ).

  • ( , , *.map), . , . Chrome Firefox, . , ( , ) "" .

+13

All Articles