Merge branch 'master' of https://github.com/beefsack/atom-beautify into beefsack-master

This commit is contained in:
Glavin Wiechert 2016-12-30 01:44:32 -04:00
commit 55216a8cef
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,22 @@
###
Requires http://hhvm.com/
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class HhFormat extends Beautifier
name: "hh_format"
link: "http://hhvm.com/"
options:
PHP: true
beautify: (text, language, options) ->
@run("hh_format", [
@tempFile("input", text)
]).then((output) =>
# hh_format can exit with status 0 and no output for some files which
# it doesn't format. In that case we just return original text.
if output.trim() then output else text
)

View File

@ -43,6 +43,7 @@ module.exports = class Beautifiers extends EventEmitter
'crystal'
'dfmt'
'elm-format'
'hh_format'
'htmlbeautifier'
'csscomb'
'gherkin'