Merge branch 'master' into master
This commit is contained in:
commit
8ffae7ac2f
|
@ -0,0 +1,19 @@
|
||||||
|
# Number of days of inactivity before an issue becomes stale
|
||||||
|
daysUntilStale: 60
|
||||||
|
# Number of days of inactivity before a stale issue is closed
|
||||||
|
daysUntilClose: 7
|
||||||
|
# Issues with these labels will never be considered stale
|
||||||
|
exemptLabels:
|
||||||
|
- high priority
|
||||||
|
- pending-publication
|
||||||
|
- add-language
|
||||||
|
- add-beautifier
|
||||||
|
# Label to use when marking an issue as stale
|
||||||
|
staleLabel: stale
|
||||||
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
|
markComment: >
|
||||||
|
This issue has been automatically marked as stale because it has not had
|
||||||
|
recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you
|
||||||
|
for your contributions.
|
||||||
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||||
|
closeComment: false
|
10
.travis.yml
10
.travis.yml
|
@ -97,7 +97,7 @@ before_install:
|
||||||
- brew tap homebrew/versions
|
- brew tap homebrew/versions
|
||||||
# Ruby language support
|
# Ruby language support
|
||||||
# - gem install ruby-beautify --verbose
|
# - gem install ruby-beautify --verbose
|
||||||
- gem install rubocop
|
# - gem install rubocop
|
||||||
- gem install htmlbeautifier
|
- gem install htmlbeautifier
|
||||||
- gem install puppet-lint
|
- gem install puppet-lint
|
||||||
# Sass language support
|
# Sass language support
|
||||||
|
@ -185,4 +185,10 @@ before_install:
|
||||||
pip install --user beautysh;
|
pip install --user beautysh;
|
||||||
else
|
else
|
||||||
pip install beautysh;
|
pip install beautysh;
|
||||||
fi
|
fi
|
||||||
|
# terraform
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
|
brew install terraform;
|
||||||
|
else
|
||||||
|
docker pull hashicorp/terraform;
|
||||||
|
fi
|
||||||
|
|
|
@ -1,6 +1,14 @@
|
||||||
# Next
|
# Next
|
||||||
|
- ...
|
||||||
|
|
||||||
|
# v0.30.6 (2017-10-30)
|
||||||
|
- See [#645](https://github.com/Glavin001/atom-beautify/issues/645). Add support for Terraform fmt.
|
||||||
- See [#881](https://github.com/Glavin001/atom-beautify/issues/881). Update to Prettydiff version 2!
|
- See [#881](https://github.com/Glavin001/atom-beautify/issues/881). Update to Prettydiff version 2!
|
||||||
- Fix for [#1888](https://github.com/Glavin001/atom-beautify/issues/1888). Allow 0 for minor and patch versions of Docker
|
- Fix for [#1888](https://github.com/Glavin001/atom-beautify/issues/1888). Allow 0 for minor and patch versions of Docker
|
||||||
|
- Add Atom-Beautify package settings menu item to Packages menu [#1869](https://github.com/Glavin001/atom-beautify/issues/1869)
|
||||||
|
- Add `.ttslua` file extension to Lua language
|
||||||
|
- Fix [#1638]. Update TypeScript Formatter dependency
|
||||||
|
- Fix [#1833] `os.tmpDir` deprecation warning
|
||||||
- Add hindent and brittany beautifiers for haskell
|
- Add hindent and brittany beautifiers for haskell
|
||||||
|
|
||||||
# v0.30.5 (2017-08-11)
|
# v0.30.5 (2017-08-11)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# :lipstick: [{{package.name}}](https://github.com/Glavin001/atom-beautify)
|
# :lipstick: [{{package.name}}](https://github.com/Glavin001/atom-beautify)
|
||||||
|
[![apm](https://img.shields.io/apm/dm/atom-beautify.svg)](https://atom.io/packages/atom-beautify)
|
||||||
[![Greenkeeper badge](https://badges.greenkeeper.io/Glavin001/atom-beautify.svg)](https://greenkeeper.io/)
|
[![Greenkeeper badge](https://badges.greenkeeper.io/Glavin001/atom-beautify.svg)](https://greenkeeper.io/)
|
||||||
[![GitHub issues](https://img.shields.io/github/issues/Glavin001/atom-beautify.svg?style=flat-square)](https://github.com/Glavin001/atom-beautify/issues)
|
[![GitHub issues](https://img.shields.io/github/issues/Glavin001/atom-beautify.svg?style=flat-square)](https://github.com/Glavin001/atom-beautify/issues)
|
||||||
[![GitHub stars](https://img.shields.io/github/stars/Glavin001/atom-beautify.svg?style=flat-square)](https://github.com/Glavin001/atom-beautify/stargazers)
|
[![GitHub stars](https://img.shields.io/github/stars/Glavin001/atom-beautify.svg?style=flat-square)](https://github.com/Glavin001/atom-beautify/stargazers)
|
||||||
|
@ -45,7 +46,7 @@ Atom Package: https://atom.io/packages/atom-beautify
|
||||||
apm install atom-beautify
|
apm install atom-beautify
|
||||||
```
|
```
|
||||||
|
|
||||||
Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify`
|
Or Settings/Preferences ➔ Install ➔ Search for `atom-beautify`
|
||||||
|
|
||||||
### Important Notice: Analytics
|
### Important Notice: Analytics
|
||||||
|
|
||||||
|
@ -203,6 +204,8 @@ See [`docs/troubleshooting.md`](docs/troubleshooting.md).
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
See [`CONTRIBUTING.md`](CONTRIBUTING.md).
|
||||||
|
|
||||||
[See all contributors on GitHub](../../graphs/contributors).
|
[See all contributors on GitHub](../../graphs/contributors).
|
||||||
|
|
||||||
Please update the [CHANGELOG.md](CHANGELOG.md),
|
Please update the [CHANGELOG.md](CHANGELOG.md),
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# :lipstick: [atom-beautify](https://github.com/Glavin001/atom-beautify)
|
# :lipstick: [atom-beautify](https://github.com/Glavin001/atom-beautify)
|
||||||
|
[![apm](https://img.shields.io/apm/dm/atom-beautify.svg)](https://atom.io/packages/atom-beautify)
|
||||||
[![Greenkeeper badge](https://badges.greenkeeper.io/Glavin001/atom-beautify.svg)](https://greenkeeper.io/)
|
[![Greenkeeper badge](https://badges.greenkeeper.io/Glavin001/atom-beautify.svg)](https://greenkeeper.io/)
|
||||||
[![GitHub issues](https://img.shields.io/github/issues/Glavin001/atom-beautify.svg?style=flat-square)](https://github.com/Glavin001/atom-beautify/issues)
|
[![GitHub issues](https://img.shields.io/github/issues/Glavin001/atom-beautify.svg?style=flat-square)](https://github.com/Glavin001/atom-beautify/issues)
|
||||||
[![GitHub stars](https://img.shields.io/github/stars/Glavin001/atom-beautify.svg?style=flat-square)](https://github.com/Glavin001/atom-beautify/stargazers)
|
[![GitHub stars](https://img.shields.io/github/stars/Glavin001/atom-beautify.svg?style=flat-square)](https://github.com/Glavin001/atom-beautify/stargazers)
|
||||||
|
@ -45,7 +46,7 @@ Atom Package: https://atom.io/packages/atom-beautify
|
||||||
apm install atom-beautify
|
apm install atom-beautify
|
||||||
```
|
```
|
||||||
|
|
||||||
Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify`
|
Or Settings/Preferences ➔ Install ➔ Search for `atom-beautify`
|
||||||
|
|
||||||
### Important Notice: Analytics
|
### Important Notice: Analytics
|
||||||
|
|
||||||
|
@ -113,6 +114,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/> |
|
| 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. |
|
| 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. |
|
| 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: 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! |
|
| Tidy Markdown | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
||||||
| TypeScript Formatter | :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/> |
|
| 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/> |
|
||||||
|
@ -180,6 +182,7 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
|
||||||
| SQL | `SQL (Rails)`, `SQL` |`.sql` | **[`sqlformat`](https://github.com/andialbrecht/sqlparse)** |
|
| SQL | `SQL (Rails)`, `SQL` |`.sql` | **[`sqlformat`](https://github.com/andialbrecht/sqlparse)** |
|
||||||
| SVG | `SVG` |`.svg` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| SVG | `SVG` |`.svg` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| Swig | `HTML (Swig)`, `SWIG` |`.swig` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| Swig | `HTML (Swig)`, `SWIG` |`.swig` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
|
| Terraform | `Terraform` |`.tf` | **[`terraformfmt`](https://www.terraform.io/docs/commands/fmt.html)** |
|
||||||
| TSS | `TSS` |`.tss` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| TSS | `TSS` |`.tss` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| Twig | `HTML (Twig)` |`.twig` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| Twig | `HTML (Twig)` |`.twig` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| TypeScript | `TypeScript` |`.ts` | **[`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter)** |
|
| TypeScript | `TypeScript` |`.ts` | **[`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter)** |
|
||||||
|
@ -318,6 +321,8 @@ See [`docs/troubleshooting.md`](docs/troubleshooting.md).
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
See [`CONTRIBUTING.md`](CONTRIBUTING.md).
|
||||||
|
|
||||||
[See all contributors on GitHub](../../graphs/contributors).
|
[See all contributors on GitHub](../../graphs/contributors).
|
||||||
|
|
||||||
Please update the [CHANGELOG.md](CHANGELOG.md),
|
Please update the [CHANGELOG.md](CHANGELOG.md),
|
||||||
|
|
|
@ -98,6 +98,10 @@ install:
|
||||||
- cinst emacs -y
|
- cinst emacs -y
|
||||||
- where emacs
|
- where emacs
|
||||||
|
|
||||||
|
# terraform
|
||||||
|
- cinst terraform -y
|
||||||
|
- where terraform
|
||||||
|
|
||||||
# FIXME: Enable allowEmptyChecksums, until someone fixes the checksum issue of php
|
# FIXME: Enable allowEmptyChecksums, until someone fixes the checksum issue of php
|
||||||
- choco feature enable -n allowEmptyChecksums
|
- choco feature enable -n allowEmptyChecksums
|
||||||
# PHP
|
# PHP
|
||||||
|
|
|
@ -11,8 +11,6 @@ You can use [`codo`](https://github.com/coffeedoc/codo) to build your own docume
|
||||||
After you make a change to language or beautifier `options` you will need to update the `options.json` file that is created on install.
|
After you make a change to language or beautifier `options` you will need to update the `options.json` file that is created on install.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Update src/options.json file to have new/changed options
|
|
||||||
npm run postinstall
|
|
||||||
# Update documentation to include information about those options
|
# Update documentation to include information about those options
|
||||||
npm run docs
|
npm run docs
|
||||||
```
|
```
|
||||||
|
|
|
@ -368,6 +368,23 @@ Options for SassConvert executable.
|
||||||
2. Go into *Packages* and search for "*Atom Beautify*" package.
|
2. Go into *Packages* and search for "*Atom Beautify*" package.
|
||||||
3. Find the option "*SassConvert*" and change it to your desired configuration.
|
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)
|
##### [Uncrustify](#uncrustify)
|
||||||
|
|
||||||
**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.
|
||||||
|
@ -12171,6 +12188,75 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### [Terraform](#terraform)
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`terraformfmt`](#terraformfmt)
|
||||||
|
|
||||||
|
| Option | terraformfmt |
|
||||||
|
| --- | --- |
|
||||||
|
| `disabled` | :white_check_mark: |
|
||||||
|
| `default_beautifier` | :white_check_mark: |
|
||||||
|
| `beautify_on_save` | :white_check_mark: |
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Options for language Terraform
|
||||||
|
|
||||||
|
##### [Disable Beautifying Language](#disable-beautifying-language)
|
||||||
|
|
||||||
|
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Disable Terraform 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**: `terraformfmt`
|
||||||
|
|
||||||
|
**Type**: `string`
|
||||||
|
|
||||||
|
**Enum**: `terraformfmt`
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Default Beautifier to be used for Terraform
|
||||||
|
|
||||||
|
**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 Terraform 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.
|
||||||
|
|
||||||
#### [TSS](#tss)
|
#### [TSS](#tss)
|
||||||
|
|
||||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||||
|
|
|
@ -16,3 +16,9 @@ The debugging results will be copied to your clipboard.
|
||||||
3. Create a file in your new Gist called `debug.md`.
|
3. Create a file in your new Gist called `debug.md`.
|
||||||
4. Paste your debugging results from Atom beautify into `debug.md` file in your Gist.
|
4. Paste your debugging results from Atom beautify into `debug.md` file in your Gist.
|
||||||
5. Add a link to your Gist in your new Issue.
|
5. Add a link to your Gist in your new Issue.
|
||||||
|
|
||||||
|
## Common Issues
|
||||||
|
|
||||||
|
> I receive an error when I try to install or update Atom Beautify
|
||||||
|
|
||||||
|
Run `apm clean` from your terminal, then retry
|
|
@ -0,0 +1,18 @@
|
||||||
|
resource "aws_db_instance" "wordpress" {
|
||||||
|
# worng spaces # to much spaces
|
||||||
|
|
||||||
|
allocated_storage = 10
|
||||||
|
storage_type = "gp2"
|
||||||
|
engine = "mariadb"
|
||||||
|
engine_version = "10.0.24"
|
||||||
|
|
||||||
|
instance_class = "db.t2.micro"
|
||||||
|
identifier = "db-${var.env}"
|
||||||
|
name = "wordpress"
|
||||||
|
|
||||||
|
username = "wordpress"
|
||||||
|
password = "${var.wordpress_db_pass}"
|
||||||
|
db_subnet_group_name = "${aws_db_subnet_group.default.name}"
|
||||||
|
vpc_security_group_ids = ["${aws_security_group.RuleWebServerIn.id}"]
|
||||||
|
apply_immediately = true
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
resource "aws_db_instance" "wordpress" {
|
||||||
|
# worng spaces
|
||||||
|
# to much spaces
|
||||||
|
|
||||||
|
allocated_storage = 10
|
||||||
|
storage_type = "gp2"
|
||||||
|
engine = "mariadb"
|
||||||
|
engine_version = "10.0.24"
|
||||||
|
|
||||||
|
instance_class = "db.t2.micro"
|
||||||
|
identifier = "db-${var.env}"
|
||||||
|
name = "wordpress"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
username = "wordpress"
|
||||||
|
password = "${var.wordpress_db_pass}"
|
||||||
|
db_subnet_group_name = "${aws_db_subnet_group.default.name}"
|
||||||
|
vpc_security_group_ids = ["${aws_security_group.RuleWebServerIn.id}"]
|
||||||
|
apply_immediately = true
|
||||||
|
}
|
|
@ -25,6 +25,10 @@
|
||||||
'label': 'Debug'
|
'label': 'Debug'
|
||||||
'command': 'atom-beautify:help-debug-editor'
|
'command': 'atom-beautify:help-debug-editor'
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
'label': 'Settings'
|
||||||
|
'command': 'atom-beautify:open-settings'
|
||||||
|
}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
10
package.json
10
package.json
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "atom-beautify",
|
"name": "atom-beautify",
|
||||||
"main": "./src/beautify",
|
"main": "./src/beautify",
|
||||||
"version": "0.30.5",
|
"version": "0.30.6",
|
||||||
"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": {
|
||||||
|
@ -213,6 +213,7 @@
|
||||||
"atom-workspace": [
|
"atom-workspace": [
|
||||||
"atom-beautify:help-debug-editor",
|
"atom-beautify:help-debug-editor",
|
||||||
"atom-beautify:beautify-editor",
|
"atom-beautify:beautify-editor",
|
||||||
|
"atom-beautify:open-settings",
|
||||||
"atom-beautify:migrate-settings",
|
"atom-beautify:migrate-settings",
|
||||||
"core:save",
|
"core:save",
|
||||||
"core:save-as",
|
"core:save-as",
|
||||||
|
@ -280,7 +281,8 @@
|
||||||
"atom-beautify:beautify-language-visualforce",
|
"atom-beautify:beautify-language-visualforce",
|
||||||
"atom-beautify:beautify-language-xml",
|
"atom-beautify:beautify-language-xml",
|
||||||
"atom-beautify:beautify-language-xtemplate",
|
"atom-beautify:beautify-language-xtemplate",
|
||||||
"atom-beautify:beautify-language-yaml"
|
"atom-beautify:beautify-language-yaml",
|
||||||
|
"atom-beautify:beautify-language-terraform"
|
||||||
],
|
],
|
||||||
".tree-view .file .name": [
|
".tree-view .file .name": [
|
||||||
"atom-beautify:beautify-file"
|
"atom-beautify:beautify-file"
|
||||||
|
@ -415,7 +417,9 @@
|
||||||
"nginx beautify",
|
"nginx beautify",
|
||||||
"golang template",
|
"golang template",
|
||||||
"align-yaml",
|
"align-yaml",
|
||||||
"goimports"
|
"goimports",
|
||||||
|
"terraform",
|
||||||
|
"terraformfmt"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"coffeelint": "1.16.0"
|
"coffeelint": "1.16.0"
|
||||||
|
|
|
@ -82,6 +82,7 @@ module.exports = class Beautifiers extends EventEmitter
|
||||||
'marko-beautifier'
|
'marko-beautifier'
|
||||||
'formatR'
|
'formatR'
|
||||||
'beautysh'
|
'beautysh'
|
||||||
|
'terraformfmt'
|
||||||
]
|
]
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
###
|
||||||
|
Requires terraform installed
|
||||||
|
###
|
||||||
|
|
||||||
|
"use strict"
|
||||||
|
Beautifier = require('./beautifier')
|
||||||
|
|
||||||
|
module.exports = class Terraformfmt extends Beautifier
|
||||||
|
name: "terraformfmt"
|
||||||
|
link: "https://www.terraform.io/docs/commands/fmt.html"
|
||||||
|
|
||||||
|
options: {
|
||||||
|
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) ->
|
||||||
|
@exe("terraform").run([
|
||||||
|
"fmt"
|
||||||
|
tempFile = @tempFile("input", text)
|
||||||
|
])
|
||||||
|
.then(=>
|
||||||
|
@readFile(tempFile)
|
||||||
|
)
|
|
@ -556,6 +556,9 @@ handleSaveEvent = ->
|
||||||
)
|
)
|
||||||
plugin.subscriptions.add disposable
|
plugin.subscriptions.add disposable
|
||||||
|
|
||||||
|
openSettings = ->
|
||||||
|
atom.workspace.open('atom://config/packages/atom-beautify')
|
||||||
|
|
||||||
getUnsupportedOptions = ->
|
getUnsupportedOptions = ->
|
||||||
settings = atom.config.get('atom-beautify')
|
settings = atom.config.get('atom-beautify')
|
||||||
schema = atom.config.getSchema('atom-beautify')
|
schema = atom.config.getSchema('atom-beautify')
|
||||||
|
@ -622,6 +625,7 @@ plugin.activate = ->
|
||||||
@subscriptions.add handleSaveEvent()
|
@subscriptions.add handleSaveEvent()
|
||||||
@subscriptions.add atom.commands.add "atom-workspace", "atom-beautify:beautify-editor", beautify
|
@subscriptions.add atom.commands.add "atom-workspace", "atom-beautify:beautify-editor", beautify
|
||||||
@subscriptions.add atom.commands.add "atom-workspace", "atom-beautify:help-debug-editor", debug
|
@subscriptions.add atom.commands.add "atom-workspace", "atom-beautify:help-debug-editor", debug
|
||||||
|
@subscriptions.add atom.commands.add "atom-workspace", "atom-beautify:open-settings", openSettings
|
||||||
@subscriptions.add atom.commands.add ".tree-view .file .name", "atom-beautify:beautify-file", beautifyFile
|
@subscriptions.add atom.commands.add ".tree-view .file .name", "atom-beautify:beautify-file", beautifyFile
|
||||||
@subscriptions.add atom.commands.add ".tree-view .directory .name", "atom-beautify:beautify-directory", beautifyDirectory
|
@subscriptions.add atom.commands.add ".tree-view .directory .name", "atom-beautify:beautify-directory", beautifyDirectory
|
||||||
@subscriptions.add atom.commands.add "atom-workspace", "atom-beautify:migrate-settings", plugin.migrateSettings
|
@subscriptions.add atom.commands.add "atom-workspace", "atom-beautify:migrate-settings", plugin.migrateSettings
|
||||||
|
|
|
@ -77,6 +77,7 @@ module.exports = class Languages
|
||||||
"xml"
|
"xml"
|
||||||
"xtemplate"
|
"xtemplate"
|
||||||
"yaml"
|
"yaml"
|
||||||
|
"terraform"
|
||||||
]
|
]
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
module.exports = {
|
||||||
|
|
||||||
|
name: "Terraform"
|
||||||
|
namespace: "terraform"
|
||||||
|
fallback: ['js']
|
||||||
|
|
||||||
|
###
|
||||||
|
Supported Grammars
|
||||||
|
###
|
||||||
|
grammars: [
|
||||||
|
"Terraform"
|
||||||
|
]
|
||||||
|
|
||||||
|
###
|
||||||
|
Supported extensions
|
||||||
|
###
|
||||||
|
extensions: [
|
||||||
|
"tf"
|
||||||
|
]
|
||||||
|
}
|
|
@ -9132,6 +9132,47 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"terraform": {
|
||||||
|
"title": "Terraform",
|
||||||
|
"type": "object",
|
||||||
|
"description": "Options for language Terraform",
|
||||||
|
"collapsed": true,
|
||||||
|
"beautifiers": [
|
||||||
|
"terraformfmt"
|
||||||
|
],
|
||||||
|
"grammars": [
|
||||||
|
"Terraform"
|
||||||
|
],
|
||||||
|
"extensions": [
|
||||||
|
"tf"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"disabled": {
|
||||||
|
"title": "Disable Beautifying Language",
|
||||||
|
"order": -3,
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Disable Terraform Beautification"
|
||||||
|
},
|
||||||
|
"default_beautifier": {
|
||||||
|
"title": "Default Beautifier",
|
||||||
|
"order": -2,
|
||||||
|
"type": "string",
|
||||||
|
"default": "terraformfmt",
|
||||||
|
"description": "Default Beautifier to be used for Terraform",
|
||||||
|
"enum": [
|
||||||
|
"terraformfmt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"beautify_on_save": {
|
||||||
|
"title": "Beautify On Save",
|
||||||
|
"order": -1,
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Automatically beautify Terraform files on save"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"executables": {
|
"executables": {
|
||||||
"title": "Executables",
|
"title": "Executables",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -9378,6 +9419,22 @@
|
||||||
"description": "Absolute path to the \"beautysh\" executable's binary/script."
|
"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."
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue