update to run

This commit is contained in:
Malte Brodersen 2017-10-10 17:36:29 +02:00
parent fcb15dc552
commit 91f7adb824
4 changed files with 52 additions and 4 deletions

View File

@ -111,7 +111,7 @@ Some of the supported beautifiers are developed for Node.js and are automaticall
| SassConvert | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [SassConvert (`sass-convert`)](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) with `docker pull unibeautify/sass-convert`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [SassConvert (`sass-convert`)](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) by following http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax<br/> |
| sqlformat | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/andialbrecht/sqlparse and follow the instructions. |
| stylish-haskell | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/jaspervdj/stylish-haskell and follow the instructions. |
| terraformfmt | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://www.terraform.io/docs/commands/fmt.html and follow the instructions. |
| terraformfmt | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [Terraform (`terraform`)](https://www.terraform.io) with `docker pull hashicorp/terraform`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [Terraform (`terraform`)](https://www.terraform.io) by following https://www.terraform.io<br/> |
| Tidy Markdown | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| TypeScript Formatter | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| Uncrustify | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [Uncrustify (`uncrustify`)](http://uncrustify.sourceforge.net/) with `docker pull unibeautify/uncrustify`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [Uncrustify (`uncrustify`)](http://uncrustify.sourceforge.net/) by following https://github.com/uncrustify/uncrustify<br/> |

View File

@ -368,6 +368,23 @@ Options for SassConvert executable.
2. Go into *Packages* and search for "*Atom Beautify*" package.
3. Find the option "*SassConvert*" and change it to your desired configuration.
##### [Terraform](#terraform)
**Important**: This option is only configurable from within Atom Beautify's setting panel.
**Type**: `object`
**Description**:
Options for Terraform executable.
**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 "*Terraform*" and change it to your desired configuration.
##### [Uncrustify](#uncrustify)
**Important**: This option is only configurable from within Atom Beautify's setting panel.

View File

@ -14,11 +14,26 @@ module.exports = class Terraformfmt extends Beautifier
Terraform: false
}
executables: [
{
name: "Terraform"
cmd: "terraform"
homepage: "https://www.terraform.io"
installation: "https://www.terraform.io"
version: {
parse: (text) -> text.match(/Terraform v(\d+\.\d+\.\d+)/)[1]
}
docker: {
image: "hashicorp/terraform"
}
}
]
beautify: (text, language, options) ->
@run("terraform", [
@exe("terraform").run([
"fmt"
tempFile = @tempFile("input", text)
])
.then(=>
@readFile(tempFile)
@readFile(tempFile)
)

View File

@ -9415,6 +9415,22 @@
"description": "Absolute path to the \"beautysh\" executable's binary/script."
}
}
},
"terraform": {
"key": "terraform",
"title": "Terraform",
"type": "object",
"collapsed": true,
"description": "Options for Terraform executable.",
"properties": {
"path": {
"key": "path",
"title": "Binary/Script Path",
"type": "string",
"default": "",
"description": "Absolute path to the \"terraform\" executable's binary/script."
}
}
}
}
}