update document via npm run docs

This commit is contained in:
guyskk 2016-11-20 09:24:36 +00:00
parent d85bd22bcb
commit 4a660f9e5a
2 changed files with 399 additions and 43 deletions

View File

@ -46,18 +46,18 @@ Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify`
By default `Anonymous Analytics` is enabled. By default `Anonymous Analytics` is enabled.
If you do not wish to have usage data sent to Google Analytics then please disable `Anonymous Analytics` option before using Atom-Beautify. If you do not wish to have usage data sent to Google Analytics then please disable `Anonymous Analytics` option before using Atom-Beautify.
See [`Anonymous Analytics` section of docs](https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md#anonymous-analytics) for details. See [`Anonymous Analytics` section of docs](docs/options.md#anonymous-analytics) for details.
Thank you. Thank you.
### Next Version: [Unibeautify](https://github.com/Unibeautify/unibeautify) ### Next Version: [Unibeautify](https://github.com/Unibeautify/unibeautify)
Atom-Beautify is going to be completely rewritten with [Unibeautify](https://github.com/Unibeautify/unibeautify) at its core! Atom-Beautify is going to be completely rewritten with [Unibeautify](https://github.com/Unibeautify/unibeautify) at its core!
See [`unibeautify` branch](https://github.com/Glavin001/atom-beautify/tree/unibeautify) for work in progress and [Issue #1174](https://github.com/Glavin001/atom-beautify/issues/1174). See [`unibeautify` branch](../../tree/unibeautify) for work in progress and [Issue #1174](https://github.com/Glavin001/atom-beautify/issues/1174).
## Language Support ## Language Support
See [all supported options in the documentation at `docs/options.md`](https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md). See [all supported options in the documentation at `docs/options.md`](docs/options.md).
| Language | Grammars | File Extensions | Supported Beautifiers | | Language | Grammars | File Extensions | Supported Beautifiers |
| --- | --- | --- | ---- | | --- | --- | --- | ---- |
@ -99,9 +99,9 @@ See [all supported options in the documentation at `docs/options.md`](https://g
| OCaml | `OCaml` |`.ml` | [`ocp-indent`](https://www.typerex.org/ocp-indent.html) (Default) | | OCaml | `OCaml` |`.ml` | [`ocp-indent`](https://www.typerex.org/ocp-indent.html) (Default) |
| Pawn | `Pawn` | | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) | | Pawn | `Pawn` | | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
| Perl | `Perl`, `Perl 6` |`.pl` | [`Perltidy`](http://perltidy.sourceforge.net/) (Default) | | Perl | `Perl`, `Perl 6` |`.pl` | [`Perltidy`](http://perltidy.sourceforge.net/) (Default) |
| PHP | `PHP` |`.php`, `.module`, `.inc` | [`PHP-CS-Fixer`](http://php.net/manual/en/install.php) (Default), [`PHPCBF`](http://php.net/manual/en/install.php) | | PHP | `PHP` |`.php`, `.module`, `.inc` | [`PHP-CS-Fixer`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (Default), [`PHPCBF`](http://php.net/manual/en/install.php) |
| Puppet | `Puppet` |`.pp` | [`puppet-lint`](http://puppet-lint.com/) (Default) | | Puppet | `Puppet` |`.pp` | [`puppet-lint`](http://puppet-lint.com/) (Default) |
| Python | `Python` |`.py` | [`autopep8`](https://github.com/hhatto/autopep8) (Default), [`yapf`](https://github.com/google/yapf) | | Python | `Python` |`.py` | [`autopep8`](https://github.com/hhatto/autopep8) (Default), [`pybeautifier`](https://github.com/guyskk/pybeautifier), [`yapf`](https://github.com/google/yapf) |
| R | `R` |`.r`, `.R` | [`formatR`](https://github.com/yihui/formatR) (Default) | | R | `R` |`.r`, `.R` | [`formatR`](https://github.com/yihui/formatR) (Default) |
| Riot.js | `Riot.js`, `HTML (Riot Tag)` |`.tag` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | Riot.js | `Riot.js`, `HTML (Riot Tag)` |`.tag` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| Ruby | `Ruby`, `Ruby on Rails` |`.rb` | [`Rubocop`](https://github.com/bbatsov/rubocop) (Default), [`Ruby Beautify`](https://github.com/erniebrodeur/ruby-beautify) | | Ruby | `Ruby`, `Ruby on Rails` |`.rb` | [`Rubocop`](https://github.com/bbatsov/rubocop) (Default), [`Ruby Beautify`](https://github.com/erniebrodeur/ruby-beautify) |
@ -165,22 +165,22 @@ For example:
Edit your `.jsbeautifyrc` file in any of the following locations: Edit your `.jsbeautifyrc` file in any of the following locations:
- Atom Package Settings - Atom Package Settings
`Atom``Preferences` ➔ Search for `atom-beautify` `Atom``Preferences` ➔ Search for `atom-beautify`
- Same directory as current file - Same directory as current file
- Project root - Project root
`atom-beautify` will recursively look up from the current file's directory to find `.jsbeautifyrc`. `atom-beautify` will recursively look up from the current file's directory to find `.jsbeautifyrc`.
- Your user's home directory - Your user's home directory
**Note**: *Comments are supported in `.jsbeautifyrc` thanks to [strip-json-comments](https://github.com/sindresorhus/strip-json-comments).* **Note**: *Comments are supported in `.jsbeautifyrc` thanks to [strip-json-comments](https://github.com/sindresorhus/strip-json-comments).*
See examples of both ways inside [`examples/`](https://github.com/donaldpipowitch/atom-beautify/tree/master/examples) See examples of both ways inside [`examples/`](examples)
See [all supported options in the documentation at `docs/options.md`](https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md). See [all supported options in the documentation at `docs/options.md`](docs/options.md).
### Simple ### Simple
See [examples/simple-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowitch/atom-beautify/blob/master/examples/simple-jsbeautifyrc/.jsbeautifyrc). See [examples/simple-jsbeautifyrc/.jsbeautifyrc](examples/simple-jsbeautifyrc/.jsbeautifyrc).
```json ```json
{ {
@ -198,7 +198,7 @@ See [examples/simple-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowi
### Nested (Recommended) ### Nested (Recommended)
See [examples/nested-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowitch/atom-beautify/blob/master/examples/nested-jsbeautifyrc/.jsbeautifyrc). See [examples/nested-jsbeautifyrc/.jsbeautifyrc](examples/nested-jsbeautifyrc/.jsbeautifyrc).
```json ```json
{ {
@ -236,16 +236,16 @@ See [examples/nested-jsbeautifyrc/.jsbeautifyrc](https://github.com/donaldpipowi
## Troubleshooting ## Troubleshooting
See [`docs/troubleshooting.md`](https://github.com/Glavin001/atom-beautify/blob/master/docs/troubleshooting.md). See [`docs/troubleshooting.md`](docs/troubleshooting.md).
## Contributing ## Contributing
[See all contributors on GitHub](https://github.com/donaldpipowitch/atom-beautify/graphs/contributors). [See all contributors on GitHub](../../graphs/contributors).
Please update the [CHANGELOG.md](https://github.com/donaldpipowitch/atom-beautify/blob/master/CHANGELOG.md), Please update the [CHANGELOG.md](CHANGELOG.md),
add yourself as a contributor to the [package.json](https://github.com/donaldpipowitch/atom-beautify/blob/master/package.json), add yourself as a contributor to the [package.json](package.json),
and submit a [Pull Request on GitHub](https://help.github.com/articles/using-pull-requests/). and submit a [Pull Request on GitHub](https://help.github.com/articles/using-pull-requests/).
## License ## License
[MIT](https://github.com/donaldpipowitch/atom-beautify/blob/master/LICENSE.md) © [Glavin Wiechert](https://github.com/Glavin001) [MIT](LICENSE.md) © [Glavin Wiechert](https://github.com/Glavin001)

View File

@ -8363,17 +8363,20 @@ Automatically beautify Puppet files on save
#### [Python](#python) #### [Python](#python)
**Supported Beautifiers**: [`autopep8`](#autopep8) [`yapf`](#yapf) **Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier) [`yapf`](#yapf)
| Option | autopep8 | yapf | | Option | autopep8 | pybeautifier | yapf |
| --- | --- | --- | | --- | --- | --- | --- |
| `disabled` | :white_check_mark: | :white_check_mark: | | `disabled` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| `default_beautifier` | :white_check_mark: | :white_check_mark: | | `default_beautifier` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| `beautify_on_save` | :white_check_mark: | :white_check_mark: | | `beautify_on_save` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| `ignore` | :white_check_mark: | :x: | | `formater` | :white_check_mark: | :white_check_mark: | :x: |
| `indent_size` | :white_check_mark: | :x: | | `ignore` | :white_check_mark: | :white_check_mark: | :x: |
| `max_line_length` | :white_check_mark: | :x: | | `indent_size` | :white_check_mark: | :white_check_mark: | :x: |
| `sort_imports` | :white_check_mark: | :x: | | `max_line_length` | :white_check_mark: | :white_check_mark: | :x: |
| `multi_line_output` | :white_check_mark: | :white_check_mark: | :x: |
| `sort_imports` | :white_check_mark: | :white_check_mark: | :x: |
| `style_config` | :white_check_mark: | :white_check_mark: | :x: |
**Description**: **Description**:
@ -8404,7 +8407,7 @@ Disable Python Beautification
**Type**: `string` **Type**: `string`
**Enum**: `autopep8` `yapf` **Enum**: `autopep8` `pybeautifier` `yapf`
**Description**: **Description**:
@ -8434,6 +8437,34 @@ Automatically beautify Python files on save
2. Go into *Packages* and search for "*Atom Beautify*" package. 2. Go into *Packages* and search for "*Atom Beautify*" package.
3. Find the option "*Beautify On Save*" and change it to your desired configuration. 3. Find the option "*Beautify On Save*" and change it to your desired configuration.
##### [Formater](#formater)
**Namespace**: `python`
**Key**: `formater`
**Default**: `autopep8`
**Type**: `string`
**Enum**: `autopep8` `yapf`
**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**:
formater used by pybeautifier (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"python": {
"formater": "autopep8"
}
}
```
##### [Ignore](#ignore) ##### [Ignore](#ignore)
**Namespace**: `python` **Namespace**: `python`
@ -8444,11 +8475,11 @@ Automatically beautify Python files on save
**Type**: `array` **Type**: `array`
**Supported Beautifiers**: [`autopep8`](#autopep8) **Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**: **Description**:
do not fix these errors/warnings (Supported by autopep8) do not fix these errors/warnings (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration** **Example `.jsbeautifyrc` Configuration**
@ -8472,11 +8503,11 @@ do not fix these errors/warnings (Supported by autopep8)
**Type**: `integer` **Type**: `integer`
**Supported Beautifiers**: [`autopep8`](#autopep8) **Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**: **Description**:
Indentation size/length (Supported by autopep8) Indentation size/length (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration** **Example `.jsbeautifyrc` Configuration**
@ -8498,11 +8529,11 @@ Indentation size/length (Supported by autopep8)
**Type**: `integer` **Type**: `integer`
**Supported Beautifiers**: [`autopep8`](#autopep8) **Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**: **Description**:
set maximum allowed line length (Supported by autopep8) set maximum allowed line length (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration** **Example `.jsbeautifyrc` Configuration**
@ -8514,6 +8545,34 @@ set maximum allowed line length (Supported by autopep8)
} }
``` ```
##### [Multi line output](#multi-line-output)
**Namespace**: `python`
**Key**: `multi_line_output`
**Default**: `Hanging Grid Grouped`
**Type**: `string`
**Enum**: `Grid` `Vertical` `Hanging Indent` `Vertical Hanging Indent` `Hanging Grid` `Hanging Grid Grouped` `NOQA`
**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**:
defines how from imports wrap (requires isort installed) (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"python": {
"multi_line_output": "Hanging Grid Grouped"
}
}
```
##### [Sort imports](#sort-imports) ##### [Sort imports](#sort-imports)
**Namespace**: `python` **Namespace**: `python`
@ -8522,11 +8581,11 @@ set maximum allowed line length (Supported by autopep8)
**Type**: `boolean` **Type**: `boolean`
**Supported Beautifiers**: [`autopep8`](#autopep8) **Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**: **Description**:
sort imports (requires isort installed) (Supported by autopep8) sort imports (requires isort installed) (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration** **Example `.jsbeautifyrc` Configuration**
@ -8538,6 +8597,32 @@ sort imports (requires isort installed) (Supported by autopep8)
} }
``` ```
##### [Style config](#style-config)
**Namespace**: `python`
**Key**: `style_config`
**Default**: `pep8`
**Type**: `string`
**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**:
formatting style used by yapf (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"python": {
"style_config": "pep8"
}
}
```
#### [R](#r) #### [R](#r)
**Supported Beautifiers**: [`formatR`](#formatr) **Supported Beautifiers**: [`formatR`](#formatr)
@ -16782,11 +16867,11 @@ List of tags (defaults to [head,body,/html] that should have an extra newline be
**Type**: `integer` **Type**: `integer`
**Supported Beautifiers**: [`autopep8`](#autopep8) **Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**: **Description**:
set maximum allowed line length (Supported by autopep8) set maximum allowed line length (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration** **Example `.jsbeautifyrc` Configuration**
@ -16808,11 +16893,11 @@ set maximum allowed line length (Supported by autopep8)
**Type**: `integer` **Type**: `integer`
**Supported Beautifiers**: [`autopep8`](#autopep8) **Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**: **Description**:
Indentation size/length (Supported by autopep8) Indentation size/length (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration** **Example `.jsbeautifyrc` Configuration**
@ -16834,11 +16919,11 @@ Indentation size/length (Supported by autopep8)
**Type**: `array` **Type**: `array`
**Supported Beautifiers**: [`autopep8`](#autopep8) **Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**: **Description**:
do not fix these errors/warnings (Supported by autopep8) do not fix these errors/warnings (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration** **Example `.jsbeautifyrc` Configuration**
@ -16852,6 +16937,60 @@ do not fix these errors/warnings (Supported by autopep8)
} }
``` ```
##### [Formater](#formater)
**Namespace**: `python`
**Key**: `formater`
**Default**: `autopep8`
**Type**: `string`
**Enum**: `autopep8` `yapf`
**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**:
formater used by pybeautifier (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"python": {
"formater": "autopep8"
}
}
```
##### [Style config](#style-config)
**Namespace**: `python`
**Key**: `style_config`
**Default**: `pep8`
**Type**: `string`
**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**:
formatting style used by yapf (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"python": {
"style_config": "pep8"
}
}
```
##### [Sort imports](#sort-imports) ##### [Sort imports](#sort-imports)
**Namespace**: `python` **Namespace**: `python`
@ -16860,11 +16999,11 @@ do not fix these errors/warnings (Supported by autopep8)
**Type**: `boolean` **Type**: `boolean`
**Supported Beautifiers**: [`autopep8`](#autopep8) **Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**: **Description**:
sort imports (requires isort installed) (Supported by autopep8) sort imports (requires isort installed) (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration** **Example `.jsbeautifyrc` Configuration**
@ -16876,6 +17015,34 @@ sort imports (requires isort installed) (Supported by autopep8)
} }
``` ```
##### [Multi line output](#multi-line-output)
**Namespace**: `python`
**Key**: `multi_line_output`
**Default**: `Hanging Grid Grouped`
**Type**: `string`
**Enum**: `Grid` `Vertical` `Hanging Indent` `Vertical Hanging Indent` `Hanging Grid` `Hanging Grid Grouped` `NOQA`
**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**:
defines how from imports wrap (requires isort installed) (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"python": {
"multi_line_output": "Hanging Grid Grouped"
}
}
```
### coffee-fmt ### coffee-fmt
@ -16985,6 +17152,195 @@ Indentation size/length (Supported by formatR)
``` ```
### pybeautifier
##### [Max line length](#max-line-length)
**Namespace**: `python`
**Key**: `max_line_length`
**Default**: `79`
**Type**: `integer`
**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**:
set maximum allowed line length (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"python": {
"max_line_length": 79
}
}
```
##### [Indent size](#indent-size)
**Namespace**: `python`
**Key**: `indent_size`
**Default**: `4`
**Type**: `integer`
**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**:
Indentation size/length (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"python": {
"indent_size": 4
}
}
```
##### [Ignore](#ignore)
**Namespace**: `python`
**Key**: `ignore`
**Default**: `E24`
**Type**: `array`
**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**:
do not fix these errors/warnings (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"python": {
"ignore": [
"E24"
]
}
}
```
##### [Formater](#formater)
**Namespace**: `python`
**Key**: `formater`
**Default**: `autopep8`
**Type**: `string`
**Enum**: `autopep8` `yapf`
**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**:
formater used by pybeautifier (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"python": {
"formater": "autopep8"
}
}
```
##### [Style config](#style-config)
**Namespace**: `python`
**Key**: `style_config`
**Default**: `pep8`
**Type**: `string`
**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**:
formatting style used by yapf (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"python": {
"style_config": "pep8"
}
}
```
##### [Sort imports](#sort-imports)
**Namespace**: `python`
**Key**: `sort_imports`
**Type**: `boolean`
**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**:
sort imports (requires isort installed) (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"python": {
"sort_imports": false
}
}
```
##### [Multi line output](#multi-line-output)
**Namespace**: `python`
**Key**: `multi_line_output`
**Default**: `Hanging Grid Grouped`
**Type**: `string`
**Enum**: `Grid` `Vertical` `Hanging Indent` `Vertical Hanging Indent` `Hanging Grid` `Hanging Grid Grouped` `NOQA`
**Supported Beautifiers**: [`autopep8`](#autopep8) [`pybeautifier`](#pybeautifier)
**Description**:
defines how from imports wrap (requires isort installed) (Supported by autopep8, pybeautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"python": {
"multi_line_output": "Hanging Grid Grouped"
}
}
```
### rustfmt ### rustfmt
##### [Rustfmt path](#rustfmt-path) ##### [Rustfmt path](#rustfmt-path)