Вопрос

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