Class: Beautifier

Defined in: src/beautifiers/beautifier.coffee

Direct Known Subclasses

Autopep8 ClangFormat CoffeeFmt CoffeeFormatter JSBeautify Dfmt ElmFormat ErlTidy FortranBeautifier Gherkin Gofmt HTMLBeautifier JSBeautify JSCSFixer PerlTidy PHPCSFixer PHPCBF PrettyDiff PuppetFix Remark Rubocop RubyBeautify Rustfmt Sqlformat StylishHaskell TidyMarkdown TypeScriptFormatter Uncrustify Yapf

Variables Summary

Promise =
Promise

Promise

name =
'Beautifier'

Name of Beautifier

options =
{}

Supported Options

Enable options for supported languages.

  • :
  • ::
  • ::
  • ::
  • ::
languages =
null

Supported languages by this Beautifier

Extracted from the keys of the options field.

beautify =
null

Beautify text

Override this method in subclasses

_envCache =
null

Get Shell Environment variables

Special thank you to @ioquatix See https://github.com/ioquatix/script-runner/blob/v1.5.0/lib/script-runner.coffee#L45-L63

_envCacheDate =
null
_envCacheExpiry =
10000
logger =
null

Logger instance

Instance Method Summary

Constructor Details

# (void) constructor()

Constructor to setup beautifer

Instance Method Details

# (void) deprecate(warning)

Show deprecation warning to user.

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

Create temporary file

# (void) readFile(filePath)

Read file

# (void) getShellEnvironment()

# (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) commandNotFoundError(exe, help)

Add help to error.description

Note: error.description is not officially used in JavaScript, however it is used internally for Atom Beautify when displaying errors.

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

Run command-line interface command

# (void) spawn(exe, args, options)

Spawn

# (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: