691 lines
16 KiB
HTML
691 lines
16 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset='UTF-8'>
|
|
<title>Atom-Beautify Documentation</title>
|
|
<script src='../javascript/application.js'></script>
|
|
<script src='../javascript/search.js'></script>
|
|
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
|
</head>
|
|
<body>
|
|
<div id='base' data-path='../'></div>
|
|
<div id='header'>
|
|
<div id='menu'>
|
|
<a href='../extra/README.md.html' title='Atom-Beautify'>
|
|
Atom-Beautify
|
|
</a>
|
|
»
|
|
<a href='../alphabetical_index.html' title='Index'>
|
|
Index
|
|
</a>
|
|
»
|
|
<span class='title'>Beautifiers</span>
|
|
</div>
|
|
</div>
|
|
<div id='content'>
|
|
<h1>
|
|
Class:
|
|
Beautifiers
|
|
</h1>
|
|
<table class='box'>
|
|
<tr>
|
|
<td>Defined in:</td>
|
|
<td>src/beautifiers/index.coffee</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Inherits:</td>
|
|
<td>
|
|
EventEmitter
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h2>Variables Summary</h2>
|
|
<dl class='constants'>
|
|
<dt id='beautifierNames-variable'>
|
|
beautifierNames
|
|
=
|
|
</dt>
|
|
<dd>
|
|
<pre><code class='coffeescript'>['uncrustify', 'align-yaml', 'autopep8', 'brittany', 'coffee-formatter', 'coffee-fmt', 'cljfmt', 'clang-format', 'crystal', 'dfmt', 'elm-format', 'hh_format', 'htmlbeautifier', 'csscomb', 'gherkin', 'gn', 'gofmt', 'goimports', 'latex-beautify', 'fortran-beautifier', 'hindent', 'vhdl-beautifier', 'js-beautify', 'jscs', 'eslint', 'lua-beautifier', 'nginx-beautify', 'ocp-indent', 'perltidy', 'php-cs-fixer', 'phpcbf', 'prettier', 'prettydiff', 'pybeautifier', 'pug-beautify', 'puppet-fix', 'remark', 'rubocop', 'ruby-beautify', 'rustfmt', 'sass-convert', 'sqlformat', 'stylish-haskell', 'tidy-markdown', 'typescript-formatter', 'vue-beautifier', 'yapf', 'erl_tidy', 'marko-beautifier', 'formatR', 'beautysh', 'terraformfmt', 'verilog-mode']</code></pre>
|
|
<div class='docstring'>
|
|
<p>List of beautifier names</p><p>To register a beautifier add its name here</p>
|
|
</div>
|
|
<div class='tags'>
|
|
</div>
|
|
</dd>
|
|
<dt id='beautifiers-variable'>
|
|
beautifiers
|
|
=
|
|
</dt>
|
|
<dd>
|
|
<pre><code class='coffeescript'>null</code></pre>
|
|
<div class='docstring'>
|
|
<p>List of loaded beautifiers</p><p>Autogenerated in <code>constructor</code> from <code>beautifierNames</code></p>
|
|
</div>
|
|
<div class='tags'>
|
|
</div>
|
|
</dd>
|
|
<dt id='options-variable'>
|
|
options
|
|
=
|
|
</dt>
|
|
<dd>
|
|
<pre><code class='coffeescript'>null</code></pre>
|
|
<div class='docstring'>
|
|
<p>All beautifier options</p><p>Autogenerated in <code>constructor</code></p>
|
|
</div>
|
|
<div class='tags'>
|
|
</div>
|
|
</dd>
|
|
<dt id='findFileResults-variable'>
|
|
findFileResults
|
|
=
|
|
</dt>
|
|
<dd>
|
|
<pre><code class='coffeescript'>{}</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<h2>Instance Method Summary</h2>
|
|
<ul class='summary'>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#loadOptions-dynamic'>
|
|
#
|
|
(void)
|
|
<b>loadOptions</b><span>()</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#encodeURI-dynamic'>
|
|
#
|
|
(void)
|
|
<b>encodeURI</b><span>(str)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
From <a href="https://github.com/atom/notifications/blob/01779ade79e7196f1603b8c1fa31716aa4a33911/lib/notification-issue.coffee#L130">https://github.com/atom/notifications/blob/01779ade79e7196f1603b8c1fa31716aa4a33911/lib/notification-issue.coffee#L130</a>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getBeautifiers-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getBeautifiers</b><span>(language)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getBeautifierForLanguage-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getBeautifierForLanguage</b><span>(language)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getExtension-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getExtension</b><span>(filePath)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getLanguages-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getLanguages</b><span>(grammar, filePath)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getLanguage-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getLanguage</b><span>(grammar, filePath)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getOptionsForLanguage-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getOptionsForLanguage</b><span>(allOptions, language)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#transformOptions-dynamic'>
|
|
#
|
|
(void)
|
|
<b>transformOptions</b><span>(beautifier, languageName, options)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#trackEvent-dynamic'>
|
|
#
|
|
(void)
|
|
<b>trackEvent</b><span>(payload)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#trackTiming-dynamic'>
|
|
#
|
|
(void)
|
|
<b>trackTiming</b><span>(payload)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#track-dynamic'>
|
|
#
|
|
(void)
|
|
<b>track</b><span>(type, payload)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#beautify-dynamic'>
|
|
#
|
|
(void)
|
|
<b>beautify</b><span>(text, allOptions, grammar, filePath, {onSave, language} = {})</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getUserHome-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getUserHome</b><span>()</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
CLI
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#verifyExists-dynamic'>
|
|
#
|
|
(void)
|
|
<b>verifyExists</b><span>(fullPath)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#findFile-dynamic'>
|
|
#
|
|
(void)
|
|
<b>findFile</b><span>(name, dir, upwards = true)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
Storage for memoized results from find file Should prevent lots of directory traversal &
|
|
lookups when liniting an entire project
|
|
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#findConfig-dynamic'>
|
|
#
|
|
(void)
|
|
<b>findConfig</b><span>(config, file, upwards = true)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
Tries to find a configuration file in either project directory or in the home directory.
|
|
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getConfigOptionsFromSettings-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getConfigOptionsFromSettings</b><span>(langs)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getConfig-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getConfig</b><span>(startPath, upwards = true)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
Look for .jsbeautifierrc in file and home path, check env variables
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getOptionsForPath-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getOptionsForPath</b><span>(editedFilePath, editor)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#isNestedOptions-dynamic'>
|
|
#
|
|
(void)
|
|
<b>isNestedOptions</b><span>(currOptions)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getOptions-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getOptions</b><span>(selections, allOptions)</span>
|
|
</a>
|
|
</span>
|
|
<span class='bound note title'>Bound</span>
|
|
<span class='desc'>
|
|
</span>
|
|
</li>
|
|
</ul>
|
|
<h2>Constructor Details</h2>
|
|
<div class='methods'>
|
|
<div class='method_details'>
|
|
<p class='signature' id='constructor-dynamic'>
|
|
#
|
|
(void)
|
|
<b>constructor</b><span>()</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>Constructor</p>
|
|
</div>
|
|
<div class='tags'>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<h2>Instance Method Details</h2>
|
|
<div class='methods'>
|
|
<div class='method_details'>
|
|
<p class='signature' id='loadOptions-dynamic'>
|
|
#
|
|
(void)
|
|
<b>loadOptions</b><span>()</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='encodeURI-dynamic'>
|
|
#
|
|
(void)
|
|
<b>encodeURI</b><span>(str)</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>From <a href="https://github.com/atom/notifications/blob/01779ade79e7196f1603b8c1fa31716aa4a33911/lib/notification-issue.coffee#L130">https://github.com/atom/notifications/blob/01779ade79e7196f1603b8c1fa31716aa4a33911/lib/notification-issue.coffee#L130</a></p>
|
|
</div>
|
|
<div class='tags'>
|
|
</div>
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getBeautifiers-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getBeautifiers</b><span>(language)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getBeautifierForLanguage-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getBeautifierForLanguage</b><span>(language)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getExtension-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getExtension</b><span>(filePath)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getLanguages-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getLanguages</b><span>(grammar, filePath)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getLanguage-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getLanguage</b><span>(grammar, filePath)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getOptionsForLanguage-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getOptionsForLanguage</b><span>(allOptions, language)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='transformOptions-dynamic'>
|
|
#
|
|
(void)
|
|
<b>transformOptions</b><span>(beautifier, languageName, options)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='trackEvent-dynamic'>
|
|
#
|
|
(void)
|
|
<b>trackEvent</b><span>(payload)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='trackTiming-dynamic'>
|
|
#
|
|
(void)
|
|
<b>trackTiming</b><span>(payload)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='track-dynamic'>
|
|
#
|
|
(void)
|
|
<b>track</b><span>(type, payload)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='beautify-dynamic'>
|
|
#
|
|
(void)
|
|
<b>beautify</b><span>(text, allOptions, grammar, filePath, {onSave, language} = {})</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getUserHome-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getUserHome</b><span>()</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>CLI</p>
|
|
</div>
|
|
<div class='tags'>
|
|
</div>
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='verifyExists-dynamic'>
|
|
#
|
|
(void)
|
|
<b>verifyExists</b><span>(fullPath)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='findFile-dynamic'>
|
|
#
|
|
(void)
|
|
<b>findFile</b><span>(name, dir, upwards = true)</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>Storage for memoized results from find file
|
|
Should prevent lots of directory traversal &
|
|
lookups when liniting an entire project</p>
|
|
</div>
|
|
<div class='tags'>
|
|
</div>
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='findConfig-dynamic'>
|
|
#
|
|
(void)
|
|
<b>findConfig</b><span>(config, file, upwards = true)</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>Tries to find a configuration file in either project directory
|
|
or in the home directory. Configuration files are named
|
|
'.jsbeautifyrc'.</p><p>@returns {string} a path to the config file</p>
|
|
</div>
|
|
<div class='tags'>
|
|
<h3>Parameters:</h3>
|
|
<ul class='param'>
|
|
<li>
|
|
<span class='name'>config</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>string</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>name of the configuration file </span>
|
|
</li>
|
|
<li>
|
|
<span class='name'>file</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>string</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>path to the file to be linted </span>
|
|
</li>
|
|
<li>
|
|
<span class='name'>upwards</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>boolean</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>should recurse upwards on failure? (default: true) </span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getConfigOptionsFromSettings-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getConfigOptionsFromSettings</b><span>(langs)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getConfig-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getConfig</b><span>(startPath, upwards = true)</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>Look for .jsbeautifierrc in file and home path, check env variables</p>
|
|
</div>
|
|
<div class='tags'>
|
|
</div>
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getOptionsForPath-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getOptionsForPath</b><span>(editedFilePath, editor)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='isNestedOptions-dynamic'>
|
|
#
|
|
(void)
|
|
<b>isNestedOptions</b><span>(currOptions)</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getOptions-dynamic'>
|
|
#
|
|
(void)
|
|
<b>getOptions</b><span>(selections, allOptions)</span>
|
|
<span class='bound note'>Bound</span>
|
|
<br>
|
|
</p>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id='footer'>
|
|
By
|
|
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
|
Codo
|
|
</a>
|
|
2.1.2
|
|
✲
|
|
Press H to see the keyboard shortcuts
|
|
✲
|
|
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
|
✲
|
|
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
|
</div>
|
|
<iframe id='search_frame'></iframe>
|
|
<div id='fuzzySearch'>
|
|
<input type='text'>
|
|
<ol></ol>
|
|
</div>
|
|
<div id='help'>
|
|
<p>
|
|
Quickly fuzzy find classes, mixins, methods, file:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<span>T</span>
|
|
Open fuzzy finder dialog
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
Control the navigation frame:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<span>L</span>
|
|
Toggle list view
|
|
</li>
|
|
<li>
|
|
<span>C</span>
|
|
Show class list
|
|
</li>
|
|
<li>
|
|
<span>I</span>
|
|
Show mixin list
|
|
</li>
|
|
<li>
|
|
<span>F</span>
|
|
Show file list
|
|
</li>
|
|
<li>
|
|
<span>M</span>
|
|
Show method list
|
|
</li>
|
|
<li>
|
|
<span>E</span>
|
|
Show extras list
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
You can focus and blur the search input:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<span>S</span>
|
|
Focus search input
|
|
</li>
|
|
<li>
|
|
<span>Esc</span>
|
|
Blur search input
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html> |