문제

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?

도움이 되었습니까?

해결책

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

다른 팁

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
      },
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top