Class: Beautifier

Defined in: src/beautifiers/beautifier.coffee

Direct Known Subclasses

AlignYaml Autopep8 BashBeautify Brittany ClangFormat Cljfmt CoffeeFmt CoffeeFormatter Crystal JSBeautify Dfmt ElmFormat ErlTidy ESLintFixer R FortranBeautifier Gherkin GN Gofmt Goimports HhFormat Hindent HTMLBeautifier JSBeautify JSCSFixer LatexBeautify Lua MarkoBeautifier NginxBeautify OCPIndent PerlTidy PHPCSFixer PHPCBF Prettier PrettyDiff PugBeautify PuppetFix PythonBeautifier Remark Rubocop RubyBeautify Rustfmt SassConvert Sqlformat StylishHaskell Terraformfmt TidyMarkdown TypeScriptFormatter Uncrustify EmacsVerilogMode VhdlBeautifier VueBeautifier Yapf

Variables Summary

Promise =
Promise

Promise

name =
'Beautifier'

Name of Beautifier

options =
{}

Supported Options

Enable options for supported languages.

  • :
  • ::
  • ::
  • ::
  • ::
executables =
[]
_exe =
{}
languages =
null

Supported languages by this Beautifier

Extracted from the keys of the options field.

beautify =
null

Beautify text

Override this method in subclasses

logger =
null

Logger instance

Instance Method Summary

Constructor Details

# (void) constructor()

Constructor to setup beautifer

Instance Method Details

# (void) isPreInstalled()

Is the beautifier a command-line interface beautifier?

# (void) loadExecutables()

# (void) exe(cmd)

# (void) deprecate(warning)

Show deprecation warning to user.

# (void) deprecateOptionForExecutable(exeName, oldOption, newOption)

# (void) tempFile(name = "atom-beautify-temp", contents = "", ext = "")

Create temporary file

# (void) readFile(filePath)

Read file

# (void) findFile(startDir, fileNames)

Find file

# (void) getDefaultLineEnding(crlf, lf, optionEol)

Retrieves the default line ending based upon the Atom configuration line-ending-selector.defaultLineEnding. If the Atom configuration indicates "OS Default", the process.platform is queried, returning CRLF for Windows systems and LF for all other systems. Code modified from atom/line-ending-selector returns: The correct line-ending character sequence based upon the Atom configuration, or null if the Atom line ending configuration was not recognized. see: https://github.com/atom/line-ending-selector/blob/master/lib/main.js

# (void) which(exe, options = {})

Like the unix which utility.

Finds the first instance of a specified executable in the PATH environment variable. Does not cache the results, so hash -r is not needed when the PATH changes. See https://github.com/isaacs/node-which

# (void) run(executable, args, {cwd, ignoreReturnCode, help, onStdin} = {})

Run command-line interface command

# (void) setupLogger()

Initialize and configure Logger

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: