Checks file path exists or not
This commit is contained in:
parent
ee3d9b30af
commit
dd6080e435
|
@ -2,6 +2,7 @@
|
|||
Beautifier = require('./beautifier')
|
||||
|
||||
module.exports = class MarkoBeautifier extends Beautifier
|
||||
|
||||
name: 'Marko Beautifier'
|
||||
|
||||
options:
|
||||
|
@ -22,7 +23,7 @@ module.exports = class MarkoBeautifier extends Beautifier
|
|||
|
||||
prettyprintOptions =
|
||||
syntax : options.syntax
|
||||
filename: if context.filePath then context.filePath else require.resolve('marko-prettyprint')
|
||||
filename: if context? and context.filePath? then context.filePath else require.resolve('marko-prettyprint')
|
||||
indent: indent
|
||||
|
||||
try
|
||||
|
|
|
@ -8,16 +8,15 @@ path = require('path')
|
|||
|
||||
module.exports = class PHPCSFixer extends Beautifier
|
||||
|
||||
name: "PHP-CS-Fixer"
|
||||
name: 'PHP-CS-Fixer'
|
||||
|
||||
options: {
|
||||
options:
|
||||
PHP: true
|
||||
}
|
||||
|
||||
beautify: (text, language, options, context) ->
|
||||
@debug('php-cs-fixer', options)
|
||||
|
||||
configFile = if context.filePath then @findFile(path.dirname(context.filePath), '.php_cs')
|
||||
configFile = if context? and context.filePath? then @findFile(path.dirname(context.filePath), '.php_cs')
|
||||
|
||||
if @isWindows
|
||||
# Find php-cs-fixer.phar script
|
||||
|
|
Loading…
Reference in New Issue