Checks file path exists or not

This commit is contained in:
Sina Sharifzade 2016-06-09 20:08:44 +04:30
parent ee3d9b30af
commit dd6080e435
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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