Merge branch 'master' of https://github.com/beefsack/atom-beautify into beefsack-master
This commit is contained in:
commit
55216a8cef
|
@ -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
|
||||
)
|
|
@ -43,6 +43,7 @@ module.exports = class Beautifiers extends EventEmitter
|
|||
'crystal'
|
||||
'dfmt'
|
||||
'elm-format'
|
||||
'hh_format'
|
||||
'htmlbeautifier'
|
||||
'csscomb'
|
||||
'gherkin'
|
||||
|
|
Loading…
Reference in New Issue