Permalink
Browse files

Build: Add filename to the message when errors occur of the languages…

… files
  • Loading branch information...
iissnan committed Mar 15, 2017
1 parent d6c849d commit c8fcc2380a4e26cc24570d484bedd4bcfa3753ae
Showing with 8 additions and 3 deletions.
  1. +8 −3 gulpfile.coffee
View
@@ -32,13 +32,18 @@ gulp.task 'validate:config', (cb) ->
cb new Error(error)
gulp.task 'validate:languages', (cb) ->
- languages = fs.readdirSync path.join(__dirname, 'languages')
+ languagesPath = path.join __dirname, 'languages'
+ languages = fs.readdirSync languagesPath
errors = []
+
for lang in languages
+ languagePath = path.join languagesPath, lang
try
- yaml.safeLoad fs.readFileSync path.join(__dirname, 'languages', lang)
+ yaml.safeLoad fs.readFileSync(languagePath), {
+ filename: path.relative(__dirname, languagePath)
+ }
catch error
- errors.push(error)
+ errors.push error
if errors.length == 0
cb()

0 comments on commit c8fcc23

Please sign in to comment.