fixing merge conflicts

This commit is contained in:
Sebastian DiLorenzo 2016-08-29 11:35:41 +02:00
commit 48fa8dd634
15 changed files with 183 additions and 516 deletions

View File

@ -86,6 +86,8 @@ before_install:
- gem install rubocop - gem install rubocop
- gem install htmlbeautifier - gem install htmlbeautifier
- gem install puppet-lint - gem install puppet-lint
# Sass language support
- gem install sass
# Python language support # Python language support
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo chmod 777 -R /opt/python; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo chmod 777 -R /opt/python; fi

View File

@ -42,6 +42,13 @@ apm install atom-beautify
Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify` Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify`
### Important Notice: Analytics
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.
See [`Anonymous Analytics` section of docs](https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md#anonymous-analytics) for details.
Thank you.
## 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`](https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md).

View File

@ -42,6 +42,13 @@ apm install atom-beautify
Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify` Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify`
### Important Notice: Analytics
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.
See [`Anonymous Analytics` section of docs](https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md#anonymous-analytics) for details.
Thank you.
## 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`](https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md).
@ -56,7 +63,7 @@ See [all supported options in the documentation at `docs/options.md`](https://g
| C++ | `C++` |`.h`, `.hh`, `.cc`, `.cpp`, `.cxx`, `.C`, `.c++`, `.hpp`, `.hxx`, `.h++` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) | | C++ | `C++` |`.h`, `.hh`, `.cc`, `.cpp`, `.cxx`, `.C`, `.c++`, `.hpp`, `.hxx`, `.h++` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
| Crystal | `Crystal` |`.cr` | [`Crystal`](http://crystal-lang.org) (Default) | | Crystal | `Crystal` |`.cr` | [`Crystal`](http://crystal-lang.org) (Default) |
| C# | `C#` |`.cs` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) | | C# | `C#` |`.cs` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
| CSS | `CSS` |`.css` | [`CSScomb`](https://github.com/csscomb/csscomb.js), [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) | | CSS | `CSS` |`.css` | [`CSScomb`](https://github.com/csscomb/csscomb.js), [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff), [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) |
| CSV | `CSV` |`.csv` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | CSV | `CSV` |`.csv` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| D | `D` |`.d` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`dfmt`](https://github.com/Hackerpilot/dfmt) | | D | `D` |`.d` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`dfmt`](https://github.com/Hackerpilot/dfmt) |
| EJS | `JavaScript Template`, `HTML (Angular)` | | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | EJS | `JavaScript Template`, `HTML (Angular)` | | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
@ -91,8 +98,8 @@ See [all supported options in the documentation at `docs/options.md`](https://g
| 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) |
| Rust | `Rust` |`.rs`, `.rlib` | [`rustfmt`](https://github.com/nrc/rustfmt) (Default) | | Rust | `Rust` |`.rs`, `.rlib` | [`rustfmt`](https://github.com/nrc/rustfmt) (Default) |
| Sass | `Sass` |`.sass` | [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | Sass | `Sass` |`.sass` | [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) (Default) |
| SCSS | `SCSS` |`.scss` | [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | SCSS | `SCSS` |`.scss` | [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default), [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) |
| Spacebars | `Spacebars` | | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | Spacebars | `Spacebars` | | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| SQL | `SQL (Rails)`, `SQL` |`.sql` | [`sqlformat`](https://github.com/andialbrecht/sqlparse) (Default) | | SQL | `SQL (Rails)`, `SQL` |`.sql` | [`sqlformat`](https://github.com/andialbrecht/sqlparse) (Default) |
| SVG | `SVG` |`.svg` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | SVG | `SVG` |`.svg` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |

42
ROADMAP.md Normal file
View File

@ -0,0 +1,42 @@
# Roadmap to v1.0.0
- Supported usage
- [ ] Atom
- [ ] Sublime
- [ ] CLI
- [ ] Core (Node.js API)
- [ ] Core
- [ ] Standard Options & Languages
- [ ] Add Option
- Option has fields:
- `key`
- `description`
- `default`
- `type`
- ...
- [ ] Add Language
- Language has fields:
- `namespace`
- `name`
- `extensions`
- `options`
- [ ] Add Beautifier
- Supported languages and options
- Given `({ text, language, options, filePath, projectPath })`
- Beautifiers run in their own processes
- Beautifier queue limiting number of simultaneous processes
- [ ] Add Configurer
- Configurer will obtain values for the options
- [ ] CLI
- [ ] Find beautifiers globally installed named `beautifier-${name}`
- See https://github.com/yeoman/environment/blob/f9468481911c31673378b38e63872f57a1163f38/lib/resolver.js#L63
- [ ] Atom
- [ ] Configurers
- [ ] Atom Editor Settings
- [ ]
- [ ] External Beautifiers
- [ ] Services (Consumer/Provider) API
- [ ] Sublime
- Use CLI

View File

@ -93,6 +93,9 @@ install:
# Puppet-Lint # Puppet-Lint
- gem install puppet-lint - gem install puppet-lint
- where puppet-lint - where puppet-lint
# Sass
- gem install sass
- where sass-convert
# emacs # emacs
- cinst emacs -y - cinst emacs -y

View File

@ -41,7 +41,7 @@ Unique identifier for this user for tracking usage analytics
**Description**: **Description**:
There is [Segment.io](https://segment.io/) which forwards data to [Google Analytics](http://www.google.com/analytics/) to track what languages are being used the most, as well as other stats. Everything is anonymized and no personal information, such as source code, is sent. See https://github.com/Glavin001/atom-beautify/issues/47 for more details. [Google Analytics](http://www.google.com/analytics/) is used to track what languages are being used the most and causing the most errors, as well as other stats such as performance. Everything is anonymized and no personal information, such as source code, is sent. See https://github.com/Glavin001/atom-beautify/issues/47 for more details.
**How to Configure** **How to Configure**
@ -1407,27 +1407,27 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
#### [CSS](#css) #### [CSS](#css)
**Supported Beautifiers**: [`CSScomb`](#csscomb) [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Supported Beautifiers**: [`CSScomb`](#csscomb) [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) [`SassConvert`](#sassconvert)
| Option | CSScomb | JS Beautify | Pretty Diff | | Option | CSScomb | JS Beautify | Pretty Diff | SassConvert |
| --- | --- | --- | --- | | --- | --- | --- | --- | --- |
| `disabled` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | `disabled` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| `default_beautifier` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | `default_beautifier` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| `beautify_on_save` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | `beautify_on_save` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| `align_assignments` | :x: | :x: | :white_check_mark: | | `align_assignments` | :x: | :x: | :white_check_mark: | :x: |
| `configPath` | :white_check_mark: | :x: | :x: | | `configPath` | :white_check_mark: | :x: | :x: | :x: |
| `convert_quotes` | :x: | :x: | :white_check_mark: | | `convert_quotes` | :x: | :x: | :white_check_mark: | :x: |
| `end_with_newline` | :x: | :white_check_mark: | :x: | | `end_with_newline` | :x: | :white_check_mark: | :x: | :x: |
| `force_indentation` | :x: | :x: | :white_check_mark: | | `force_indentation` | :x: | :x: | :white_check_mark: | :x: |
| `indent_char` | :x: | :white_check_mark: | :white_check_mark: | | `indent_char` | :x: | :white_check_mark: | :white_check_mark: | :x: |
| `indent_comments` | :x: | :x: | :white_check_mark: | | `indent_comments` | :x: | :x: | :white_check_mark: | :x: |
| `indent_size` | :x: | :white_check_mark: | :white_check_mark: | | `indent_size` | :x: | :white_check_mark: | :white_check_mark: | :x: |
| `newline_between_rules` | :x: | :white_check_mark: | :white_check_mark: | | `newline_between_rules` | :x: | :white_check_mark: | :white_check_mark: | :x: |
| `no_lead_zero` | :x: | :x: | :white_check_mark: | | `no_lead_zero` | :x: | :x: | :white_check_mark: | :x: |
| `predefinedConfig` | :white_check_mark: | :x: | :x: | | `predefinedConfig` | :white_check_mark: | :x: | :x: | :x: |
| `preserve_newlines` | :x: | :white_check_mark: | :white_check_mark: | | `preserve_newlines` | :x: | :white_check_mark: | :white_check_mark: | :x: |
| `selector_separator_newline` | :x: | :white_check_mark: | :x: | | `selector_separator_newline` | :x: | :white_check_mark: | :x: | :x: |
| `wrap_line_length` | :x: | :white_check_mark: | :white_check_mark: | | `wrap_line_length` | :x: | :white_check_mark: | :white_check_mark: | :x: |
**Description**: **Description**:
@ -1458,7 +1458,7 @@ Disable CSS Beautification
**Type**: `string` **Type**: `string`
**Enum**: `CSScomb` `JS Beautify` `Pretty Diff` **Enum**: `CSScomb` `JS Beautify` `Pretty Diff` `SassConvert`
**Description**: **Description**:
@ -8242,102 +8242,6 @@ sort imports (requires isort installed) (Supported by autopep8)
} }
``` ```
#### [R](#r)
**Supported Beautifiers**: [`R beautifier`](#r-beautifier)
| Option | R beautifier |
| --- | --- |
| `disabled` | :white_check_mark: |
| `default_beautifier` | :white_check_mark: |
| `beautify_on_save` | :white_check_mark: |
| `indent_size` | :white_check_mark: |
**Description**:
Options for language R
##### [Disable Beautifying Language](#disable-beautifying-language)
**Important**: This option is only configurable from within Atom Beautify's setting panel.
**Type**: `boolean`
**Description**:
Disable R Beautification
**How to Configure**
1. You can open the [Settings View](https://github.com/atom/settings-view) by navigating to
*Edit > Preferences (Linux)*, *Atom > Preferences (OS X)*, or *File > Preferences (Windows)*.
2. Go into *Packages* and search for "*Atom Beautify*" package.
3. Find the option "*Disable Beautifying Language*" and change it to your desired configuration.
##### [Default Beautifier](#default-beautifier)
**Important**: This option is only configurable from within Atom Beautify's setting panel.
**Default**: `R beautifier`
**Type**: `string`
**Enum**: `R beautifier`
**Description**:
Default Beautifier to be used for R
**How to Configure**
1. You can open the [Settings View](https://github.com/atom/settings-view) by navigating to
*Edit > Preferences (Linux)*, *Atom > Preferences (OS X)*, or *File > Preferences (Windows)*.
2. Go into *Packages* and search for "*Atom Beautify*" package.
3. Find the option "*Default Beautifier*" and change it to your desired configuration.
##### [Beautify On Save](#beautify-on-save)
**Important**: This option is only configurable from within Atom Beautify's setting panel.
**Type**: `boolean`
**Description**:
Automatically beautify R files on save
**How to Configure**
1. You can open the [Settings View](https://github.com/atom/settings-view) by navigating to
*Edit > Preferences (Linux)*, *Atom > Preferences (OS X)*, or *File > Preferences (Windows)*.
2. Go into *Packages* and search for "*Atom Beautify*" package.
3. Find the option "*Beautify On Save*" and change it to your desired configuration.
##### [Indent size](#indent-size)
**Namespace**: `r`
**Key**: `indent_size`
**Default**: `4`
**Type**: `integer`
**Supported Beautifiers**: [`R beautifier`](#r-beautifier)
**Description**:
Indentation size/length (Supported by R beautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"r": {
"indent_size": 4
}
}
```
#### [Riot.js](#riot.js) #### [Riot.js](#riot.js)
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) **Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
@ -8761,25 +8665,13 @@ Path to rustfmt program (Supported by rustfmt)
#### [Sass](#sass) #### [Sass](#sass)
**Supported Beautifiers**: [`CSScomb`](#csscomb) [`Pretty Diff`](#pretty-diff) **Supported Beautifiers**: [`SassConvert`](#sassconvert)
| Option | CSScomb | Pretty Diff | | Option | SassConvert |
| --- | --- | --- | | --- | --- |
| `disabled` | :white_check_mark: | :white_check_mark: | | `disabled` | :white_check_mark: |
| `default_beautifier` | :white_check_mark: | :white_check_mark: | | `default_beautifier` | :white_check_mark: |
| `beautify_on_save` | :white_check_mark: | :white_check_mark: | | `beautify_on_save` | :white_check_mark: |
| `align_assignments` | :x: | :white_check_mark: |
| `configPath` | :white_check_mark: | :x: |
| `convert_quotes` | :x: | :white_check_mark: |
| `force_indentation` | :x: | :white_check_mark: |
| `indent_char` | :x: | :white_check_mark: |
| `indent_comments` | :x: | :white_check_mark: |
| `indent_size` | :x: | :white_check_mark: |
| `newline_between_rules` | :x: | :white_check_mark: |
| `no_lead_zero` | :x: | :white_check_mark: |
| `predefinedConfig` | :white_check_mark: | :x: |
| `preserve_newlines` | :x: | :white_check_mark: |
| `wrap_line_length` | :x: | :white_check_mark: |
**Description**: **Description**:
@ -8806,11 +8698,11 @@ Disable Sass Beautification
**Important**: This option is only configurable from within Atom Beautify's setting panel. **Important**: This option is only configurable from within Atom Beautify's setting panel.
**Default**: `Pretty Diff` **Default**: `SassConvert`
**Type**: `string` **Type**: `string`
**Enum**: `CSScomb` `Pretty Diff` **Enum**: `SassConvert`
**Description**: **Description**:
@ -8840,331 +8732,27 @@ Automatically beautify Sass 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.
##### [Align assignments](#align-assignments)
**Namespace**: `css`
**Key**: `align_assignments`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
If lists of assignments or properties should be vertically aligned for faster and easier reading. (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"align_assignments": false
}
}
```
##### [comb custom config file](#comb-custom-config-file)
**Namespace**: `css`
**Key**: `configPath`
**Type**: `string`
**Supported Beautifiers**: [`CSScomb`](#csscomb)
**Description**:
Path to custom CSScomb config file, used in absense of a `.csscomb.json` or `.csscomb.cson` at the root of your project. (Supported by CSScomb)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"configPath": ""
}
}
```
##### [Convert quotes](#convert-quotes)
**Namespace**: `css`
**Key**: `convert_quotes`
**Default**: `none`
**Type**: `string`
**Enum**: `none` `double` `single`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
Convert the quote characters delimiting strings from either double or single quotes to the other. (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"convert_quotes": "none"
}
}
```
##### [Force indentation](#force-indentation)
**Namespace**: `css`
**Key**: `force_indentation`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
if indentation should be forcefully applied to markup even if it disruptively adds unintended whitespace to the documents rendered output (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"force_indentation": false
}
}
```
##### [Indent char](#indent-char)
**Namespace**: `css`
**Key**: `indent_char`
**Default**: ` `
**Type**: `string`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
Indentation character (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"indent_char": " "
}
}
```
##### [Indent comments](#indent-comments)
**Namespace**: `css`
**Key**: `indent_comments`
**Default**: `true`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
Determines whether comments should be indented. (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"indent_comments": true
}
}
```
##### [Indent size](#indent-size)
**Namespace**: `css`
**Key**: `indent_size`
**Default**: `4`
**Type**: `integer`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
Indentation size/length (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"indent_size": 4
}
}
```
##### [Newline between rules](#newline-between-rules)
**Namespace**: `css`
**Key**: `newline_between_rules`
**Default**: `true`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
Add a newline between CSS rules (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"newline_between_rules": true
}
}
```
##### [No lead zero](#no-lead-zero)
**Namespace**: `css`
**Key**: `no_lead_zero`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
If in CSS values leading 0s immediately preceeding a decimal should be removed or prevented. (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"no_lead_zero": false
}
}
```
##### [comb predefined config](#comb-predefined-config)
**Namespace**: `css`
**Key**: `predefinedConfig`
**Default**: `csscomb`
**Type**: `string`
**Enum**: `csscomb` `yandex` `zen`
**Supported Beautifiers**: [`CSScomb`](#csscomb)
**Description**:
Used if neither a project or custom config file exists. (Supported by CSScomb)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"predefinedConfig": "csscomb"
}
}
```
##### [Preserve newlines](#preserve-newlines)
**Namespace**: `css`
**Key**: `preserve_newlines`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
Retain empty lines. Consecutive empty lines will be converted to a single empty line. (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"preserve_newlines": false
}
}
```
##### [Wrap line length](#wrap-line-length)
**Namespace**: `css`
**Key**: `wrap_line_length`
**Type**: `integer`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
Maximum amount of characters per line (0 = disable) (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"wrap_line_length": 0
}
}
```
#### [SCSS](#scss) #### [SCSS](#scss)
**Supported Beautifiers**: [`CSScomb`](#csscomb) [`Pretty Diff`](#pretty-diff) **Supported Beautifiers**: [`CSScomb`](#csscomb) [`Pretty Diff`](#pretty-diff) [`SassConvert`](#sassconvert)
| Option | CSScomb | Pretty Diff | | Option | CSScomb | Pretty Diff | SassConvert |
| --- | --- | --- | | --- | --- | --- | --- |
| `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: |
| `align_assignments` | :x: | :white_check_mark: | | `align_assignments` | :x: | :white_check_mark: | :x: |
| `configPath` | :white_check_mark: | :x: | | `configPath` | :white_check_mark: | :x: | :x: |
| `convert_quotes` | :x: | :white_check_mark: | | `convert_quotes` | :x: | :white_check_mark: | :x: |
| `force_indentation` | :x: | :white_check_mark: | | `force_indentation` | :x: | :white_check_mark: | :x: |
| `indent_char` | :x: | :white_check_mark: | | `indent_char` | :x: | :white_check_mark: | :x: |
| `indent_comments` | :x: | :white_check_mark: | | `indent_comments` | :x: | :white_check_mark: | :x: |
| `indent_size` | :x: | :white_check_mark: | | `indent_size` | :x: | :white_check_mark: | :x: |
| `newline_between_rules` | :x: | :white_check_mark: | | `newline_between_rules` | :x: | :white_check_mark: | :x: |
| `no_lead_zero` | :x: | :white_check_mark: | | `no_lead_zero` | :x: | :white_check_mark: | :x: |
| `predefinedConfig` | :white_check_mark: | :x: | | `predefinedConfig` | :white_check_mark: | :x: | :x: |
| `preserve_newlines` | :x: | :white_check_mark: | | `preserve_newlines` | :x: | :white_check_mark: | :x: |
| `wrap_line_length` | :x: | :white_check_mark: | | `wrap_line_length` | :x: | :white_check_mark: | :x: |
**Description**: **Description**:
@ -9195,7 +8783,7 @@ Disable SCSS Beautification
**Type**: `string` **Type**: `string`
**Enum**: `CSScomb` `Pretty Diff` **Enum**: `CSScomb` `Pretty Diff` `SassConvert`
**Description**: **Description**:
@ -15459,35 +15047,6 @@ Indentation character (Supported by Pug Beautify)
``` ```
### R beautifier
##### [Indent size](#indent-size)
**Namespace**: `r`
**Key**: `indent_size`
**Default**: `4`
**Type**: `integer`
**Supported Beautifiers**: [`R beautifier`](#r-beautifier)
**Description**:
Indentation size/length (Supported by R beautifier)
**Example `.jsbeautifyrc` Configuration**
```json
{
"r": {
"indent_size": 4
}
}
```
### Remark ### Remark
##### [Gfm](#gfm) ##### [Gfm](#gfm)

View File

@ -1,7 +1,18 @@
a { nav
line-height: 56px; ul
padding: 0
margin: 0
list-style: none
&:hover { li
color: blue; display: inline-block
}
} a
display: block
text-decoration: none
padding: 6px 12px
html, body,
ul, ol
margin: 0
padding: 0

View File

@ -1,6 +1,21 @@
a { nav
line-height: 56px; ul
&:hover { padding: 0
color: blue;
} margin: 0
} list-style: none
li
display: inline-block
a
display: block
text-decoration: none
padding: 6px 12px
html,body,
ul, ol
margin: 0
padding: 0

View File

@ -1,7 +1,7 @@
{ {
"name": "atom-beautify", "name": "atom-beautify",
"main": "./src/beautify", "main": "./src/beautify",
"version": "0.29.10", "version": "0.29.11",
"private": true, "private": true,
"description": "Beautify HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, Coldfusion, SQL, and more in Atom", "description": "Beautify HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, Coldfusion, SQL, and more in Atom",
"repository": { "repository": {
@ -269,7 +269,8 @@
"marko beautifier", "marko beautifier",
"r beautifier", "r beautifier",
"vue", "vue",
"vue beautifier" "vue beautifier",
"sassconvert"
], ],
"devDependencies": { "devDependencies": {
"coffeelint": "^1.10.1", "coffeelint": "^1.10.1",

View File

@ -12,7 +12,6 @@ module.exports = class JSBeautify extends Beautifier
predefinedConfig: true predefinedConfig: true
CSS: true CSS: true
LESS: true LESS: true
Sass: true
SCSS: true SCSS: true
} }

View File

@ -62,6 +62,7 @@ module.exports = class Beautifiers extends EventEmitter
'rubocop' 'rubocop'
'ruby-beautify' 'ruby-beautify'
'rustfmt' 'rustfmt'
'sass-convert'
'sqlformat' 'sqlformat'
'stylish-haskell' 'stylish-haskell'
'tidy-markdown' 'tidy-markdown'

View File

@ -55,7 +55,6 @@ module.exports = class PrettyDiff extends Beautifier
JavaScript: true JavaScript: true
CSS: true CSS: true
SCSS: true SCSS: true
Sass: true
JSON: true JSON: true
TSS: true TSS: true
Twig: true Twig: true
@ -103,7 +102,7 @@ module.exports = class PrettyDiff extends Beautifier
lang = "css" lang = "css"
when "LESS" when "LESS"
lang = "less" lang = "less"
when "SCSS", "Sass" when "SCSS"
lang = "scss" lang = "scss"
when "TSS" when "TSS"
lang = "tss" lang = "tss"

View File

@ -0,0 +1,20 @@
"use strict"
Beautifier = require('./beautifier')
module.exports = class SassConvert extends Beautifier
name: "SassConvert"
link: "http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax"
options:
# TODO: Add support for options
CSS: false
Sass: false
SCSS: false
beautify: (text, language, options, context) ->
lang = language.toLowerCase()
@run("sass-convert", [
@tempFile("input", text),
"--from", lang, "--to", lang
])

View File

@ -10,9 +10,10 @@ module.exports = {
title: 'Anonymous Analytics' title: 'Anonymous Analytics'
type : 'boolean' type : 'boolean'
default : true default : true
description : "There is [Segment.io](https://segment.io/) which forwards data to [Google description : "[Google
Analytics](http://www.google.com/analytics/) to track what languages are being Analytics](http://www.google.com/analytics/) is used to track what languages are being
used the most, as well as other stats. Everything is anonymized and no personal used the most and causing the most errors, as well as other stats such as performance.
Everything is anonymized and no personal
information, such as source code, is sent. information, such as source code, is sent.
See https://github.com/Glavin001/atom-beautify/issues/47 for more details." See https://github.com/Glavin001/atom-beautify/issues/47 for more details."
_analyticsUserId : _analyticsUserId :

View File

@ -2,7 +2,7 @@ module.exports = {
name: "Sass" name: "Sass"
namespace: "sass" namespace: "sass"
fallback: ['css', 'scss'] fallback: ['css']
### ###
Supported Grammars Supported Grammars
@ -18,6 +18,6 @@ module.exports = {
"sass" "sass"
] ]
defaultBeautifier: "Pretty Diff" defaultBeautifier: "SassConvert"
} }