Question

I know I can set the indent level of javascript that has been beautified with uglifyjs, but is it possible to get it to use tabs instead of spaces?

If not, Is there a similar tool that can? Or any patched version?

Was it helpful?

Solution

In the Uglify JS's process.js file just modify the indent function so instead of space (" ") it inserts tabs ("\t").

OTHER TIPS

Use JS beautifier. Just set it to use tabs for indent.

Try Escodegen. https://github.com/Constellation/escodegen/wiki/API

      indent: {
          style: '    ',
          base: 0,
          adjustMultilineComment: false
      },
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top