Clean up some PR code

This commit is contained in:
Glavin Wiechert 2016-09-11 21:14:44 -03:00
parent e3256d13bc
commit 0f82daa55c
11 changed files with 199 additions and 18 deletions

View File

@ -59,7 +59,7 @@ See [all supported options in the documentation at `docs/options.md`](https://g
| Arduino | `Arduino` |`.ino`, `.pde` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
| C | `C`, `opencl` |`.h`, `.c`, `.cl` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
| Coldfusion | `html` |`.cfm`, `.cfml`, `.cfc` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| Clojure | `Clojure` |`.clj`, `.cljs`, `.edn` | [`Clojure Beautifier`](https://github.com/snoe/node-cljfmt) |
| Clojure | `Clojure` |`.clj`, `.cljs`, `.edn` | [`cljfmt`](https://github.com/snoe/node-cljfmt) (Default) |
| CoffeeScript | `CoffeeScript` |`.coffee` | [`Coffee Formatter`](https://github.com/Glavin001/Coffee-Formatter), [`coffee-fmt`](https://github.com/sterpe/coffee-fmt) (Default) |
| 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) |
@ -109,6 +109,7 @@ See [all supported options in the documentation at `docs/options.md`](https://g
| TSS | `TSS` |`.tss` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| Twig | `HTML (Twig)` |`.twig` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| TypeScript | `TypeScript` |`.ts` | [`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter) (Default) |
| UX Markup | `UX` |`.ux` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| Vala | `Vala` |`.vala`, `.vapi` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) |
| Visualforce | `Visualforce` |`.page` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| Vue | `Vue Component` |`.vue` | `Vue Beautifier` (Default) |

View File

@ -592,9 +592,9 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff)
#### [Clojure](#clojure)
**Supported Beautifiers**: [`Clojure Beautifier`](#clojure-beautifier)
**Supported Beautifiers**: [`cljfmt`](#cljfmt)
| Option | Clojure Beautifier |
| Option | cljfmt |
| --- | --- |
| `disabled` | :white_check_mark: |
| `default_beautifier` | :white_check_mark: |
@ -629,7 +629,7 @@ Disable Clojure Beautification
**Type**: `string`
**Enum**: `Clojure Beautifier`
**Enum**: `cljfmt`
**Description**:
@ -11310,6 +11310,183 @@ Wrap lines at next opportunity after N characters (Supported by TypeScript Forma
}
```
#### [UX Markup](#ux-markup)
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
| Option | Pretty Diff |
| --- | --- |
| `disabled` | :white_check_mark: |
| `default_beautifier` | :white_check_mark: |
| `beautify_on_save` | :white_check_mark: |
| `indent_char` | :white_check_mark: |
| `indent_size` | :white_check_mark: |
| `preserve_newlines` | :white_check_mark: |
| `wrap_line_length` | :white_check_mark: |
**Description**:
Options for language UX Markup
##### [Disable Beautifying Language](#disable-beautifying-language)
**Important**: This option is only configurable from within Atom Beautify's setting panel.
**Type**: `boolean`
**Description**:
Disable UX Markup 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**: `Pretty Diff`
**Type**: `string`
**Enum**: `Pretty Diff`
**Description**:
Default Beautifier to be used for UX Markup
**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 UX Markup 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 char](#indent-char)
**Namespace**: `html`
**Key**: `indent_char`
**Default**: ` `
**Type**: `string`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
Indentation character (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"html": {
"indent_char": " "
}
}
```
##### [Indent size](#indent-size)
**Namespace**: `html`
**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
{
"html": {
"indent_size": 4
}
}
```
##### [Preserve newlines](#preserve-newlines)
**Namespace**: `html`
**Key**: `preserve_newlines`
**Default**: `true`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
Preserve line-breaks (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"html": {
"preserve_newlines": true
}
}
```
##### [Wrap line length](#wrap-line-length)
**Namespace**: `html`
**Key**: `wrap_line_length`
**Default**: `250`
**Type**: `integer`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
**Description**:
Maximum characters per line (0 disables) (Supported by Pretty Diff)
**Example `.jsbeautifyrc` Configuration**
```json
{
"html": {
"wrap_line_length": 250
}
}
```
#### [Vala](#vala)
**Supported Beautifiers**: [`Uncrustify`](#uncrustify)

View File

@ -1,12 +1,13 @@
<App>
<DockPanel>
<StatusBarBackground Dock="Top" />
<StatusBarBackground Dock="Top"/>
<ScrollView ClipToBounds="true">
<StackPanel>
<Text FontSize="30">Hello, world!</Text>
<Slider/>
<Button Text="Button" />
<Switch Alignment="Left" /> </StackPanel>
<Button Text="Button"/>
<Switch Alignment="Left"/>
</StackPanel>
</ScrollView>
</DockPanel>
</App>
</App>

View File

@ -278,7 +278,9 @@
"formatr",
"clojure",
"clojure beautifier",
"nunjucks"
"nunjucks",
"ux markup",
"cljfmt"
],
"devDependencies": {
"coffeelint": "^1.10.1",
@ -291,4 +293,4 @@
"lint": "coffeelint src/ spec/",
"code-docs": "codo && open docs/code/index.html"
}
}
}

View File

@ -2,13 +2,13 @@
path = require('path')
Beautifier = require('../beautifier')
module.exports = class ClojureBeautifier extends Beautifier
module.exports = class Cljfmt extends Beautifier
name: "Clojure Beautifier"
name: "cljfmt"
link: "https://github.com/snoe/node-cljfmt"
options: {
Clojure: true
Clojure: false
}
beautify: (text, language, options) ->

View File

@ -38,7 +38,7 @@ module.exports = class Beautifiers extends EventEmitter
'autopep8'
'coffee-formatter'
'coffee-fmt'
'clojure-beautifier'
'cljfmt'
'clang-format'
'crystal'
'dfmt'

View File

@ -61,7 +61,7 @@ module.exports = class PrettyDiff extends Beautifier
Twig: true
LESS: true
Swig: true
UX: true
"UX Markup": true
Visualforce: true
"Riot.js": true
XTemplate: true
@ -90,7 +90,7 @@ module.exports = class PrettyDiff extends Beautifier
lang = "markup"
when "XML", "Visualforce", "SVG"
lang = "xml"
when "HTML", "UX"
when "HTML", "Nunjucks", "UX Markup"
lang = "html"
when "JavaScript"
lang = "javascript"

View File

@ -66,7 +66,7 @@ module.exports = class Languages
"tss"
"twig"
"typescript"
"ux"
"ux_markup"
"vala"
"vue"
"visualforce"

View File

@ -1,6 +1,6 @@
module.exports = {
name: "UX"
name: "UX Markup"
namespace: "ux"
fallback: ['html']